Recreate specific colour
Posted: Sat May 26, 2018 2:16 am
I have an SVG image containing a specific colour which I would like to use. I looked up the HSL values of it in an SVG editor (Inkscape).
Now when I try to recreate that colour to use it in a primitive shape by mapping from the SVG ranges to the CFDG ones, the hue is correct, but the S and L values are lower. An example:
When generating SVG from that with the cfdg command, the resulting colour is HSL (128, 129, 85).
The documentation says that the saturation and brightness adjustments change the existing values by the given percentage towards 1. But as the initial values are 0, in my understanding the result should be the provided target values.
What am I missing?
Now when I try to recreate that colour to use it in a primitive shape by mapping from the SVG ranges to the CFDG ones, the hue is correct, but the S and L values are lower. An example:
Code: Select all
startshape colour_test
shape colour_test {
svg_h = 128
svg_s = 172
svg_l = 128
CIRCLE [ hue (svg_h / 255 * 359) saturation (svg_s / 255) brightness (svg_l / 255) ]
}
The documentation says that the saturation and brightness adjustments change the existing values by the given percentage towards 1. But as the initial values are 0, in my understanding the result should be the provided target values.
What am I missing?