In looking at gt-mbstyle ran into a common need to convert from "red" to
Color.RED.
Checking our code base ( using put yellow language:java
<https://github.com/geotools/geotools/search?utf8=%E2%9C%93&q=put+yellow+language%3Ajava&type=Code>)
we have:
- css Value.java
<https://github.com/geotools/geotools/blob/0e6fc022f395194e7670b63d2de785123a178cdf/modules/unsupported/css/src/main/java/org/geotools/styling/css/Value.java>
- has a map of names to hex strings
- ysld Colors.java
<https://github.com/geotools/geotools/blob/3f99a4c6fb34e0de153432fc2a2d5c5256e7ce49/modules/extension/ysld/src/main/java/org/geotools/ysld/Colors.java>
- has a map of X11 colors (why x11 Kevin/Torben/Justin is that a mistake?)
I would like to capture this information in one spot (rather than
duplicate).
What would you say to creating a couple of ColorConverters and would engage
based on the following hint:
/**
* The color names definition to use when converting from String to
Color.
*
* @see CommonFactoryFinder#getStyleFactory
*
* @since 17
*/
public static final OptionKey COLOR_NAMES = new
OptionKey("WEB","CSS","X11","JAVA","*");
I kind of assume SLD should respect CSS colors (as per GEOT-5633
<https://osgeo-org.atlassian.net/browse/GEOT-5633>)?
--
Jody Garnett
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel