SKM file format
-
Burkhardt once posted the RAL colour palette in a plain text SKM file format. Can someone explain the file structure to me? I have some colour palettes that I would like to convert to the SKM format, but I don't understand what the colour number in the SKM file means so I could convert my RGB, LAB or hexadecimal values.
Anssi
-
Where's this colour palette?
Or could you post some sample data? -
This is the original thread
http://www.sketchucation.com/forums/scf/viewtopic.php?f=40&t=477&st=0&sk=t&sd=a
And this is how the file starts:
3 1 RAL1000-Gruenbeige,0,8962508,0,0,0.500000,0 RAL1001-Beige,0,8893646,0,0,0.500000,0 RAL1002-Sandgelb,0,7582160,0,0,0.500000,0 RAL1003-Signalgelb,0,44530,0,0,0.500000,0
So the colour information is obviously stored in the big number after the second comma, but what does it mean?
Anssi
-
@unknownuser said:
So the colour information is obviously stored in the big number after the second comma
Seems to me a RGB Integer where each Byte is a color (Red/Green/Blue).
http://code.google.com/intl/de/apis/sketchup/docs/ourdoc/color.html
face.material = 255 # Here you may use the number
face.material = 0xff
face.material = "red"
face.material = "#ff0000" # This shows it as a 32 Bit Hex -
So how would I convert a R,G,B value or a hexagesimal (web format) colour into a number understood by SU?
Anssi
-
There was a post about this (or similar) a while (say a week) ago in one of the forums here and someone (maybe Jim? TIG?) posted some plugin (or scriplet) that did it from a text file or something. For my life I cannot find it but I'm sure it was not long ago (and not in the ruby dept.)
Sigh... I generally move every ruby related stuff there (sometimes maybe over-tidying the place) but now no avail.
Try searching, too. Sorry.
-
Doesn't SU understand them all?
face.material = 255 # This is RGB integer here Blue
face.material = 16711680 # This is RGB integer here Red
face.material = 0xff # This is hex Blue
face.material = "red" # Red by name
face.material = "#ff0000" # This shows it as a 32 Bit Hex RED
face.material = "#0000ff" # This shows it as a 32 Bit Hex BLUEEdit: Corrected color-names since the low Byte is Blue
Advertisement