Log in

View Full Version : Ssa4 color values


tin3tin
10th September 2008, 09:10
I trying to add ssa4 subtitle export to DVD slideshow GUI, but I can't figure out how to convert to those color values of the ssa4 format(not RGB/HEX).

Anyone knows how it's done?

J_Darnley
10th September 2008, 11:45
From the SSA spec:
Field 4: PrimaryColour. A long integer BGR (blue-green-red) value. ie. the byte order in the hexadecimal equivelent of this number is BBGGRR

FF0000 Blue - 16711680
00FF00 Green - 65280
0000FF Red - 255

tin3tin
10th September 2008, 11:53
How do you convert from FF0000 to 16711680?

DigitalDeviant
10th September 2008, 13:41
Easiest way for me is to use the windows calculator (in scientific mode). Click on the Hex radio button, enter your hex value then click on the Dec button and poof.

J_Darnley
10th September 2008, 13:47
Mathematics:
15 * 16^5
+15 * 16^4
+0 * 16^3
+0 * 16^2
+0 * 16^1
+0 * 16^0

Or if using C/C++, print or scanf and variants.

tin3tin
10th September 2008, 14:08
@ J_Darnley

Great, thanks, this was what I needed to get DSG to export ssa4 files. :)