UIDefaultsLoader: added over() color function to convert a translucent color into a solid color based on any background color

This commit is contained in:
Karl Tauber
2022-05-09 23:28:40 +02:00
parent 96d4bda6c8
commit 96f2a02cfa
4 changed files with 44 additions and 1 deletions

View File

@@ -482,6 +482,10 @@ class FlatCompletionProvider
"dark", colorParamDesc,
"light", colorParamDesc,
"threshold", "(optional) 0-100%, default is 43%" );
addFunction( "over",
"foreground", colorParamDesc,
"background", colorParamDesc );
}
private void addFunction( String name, String... paramNamesAndDescs ) {

View File

@@ -76,6 +76,7 @@ public class FlatThemeTokenMaker
tokenMap.put( "tint", TOKEN_FUNCTION );
tokenMap.put( "shade", TOKEN_FUNCTION );
tokenMap.put( "contrast", TOKEN_FUNCTION );
tokenMap.put( "over", TOKEN_FUNCTION );
// function options
tokenMap.put( "relative", Token.RESERVED_WORD );