View previous topic :: View next topic |
Author |
Message |
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Tue Jul 02, 2002 9:54 pm Post subject: Fluxbox style making |
|
|
I've waded through the man pages for fluxbox and X. I'm trying to figure out setting up colors in flux. For example:
Code: | toolbar.button.color: rgb:CC/CC/CC |
I've found /usr/X11R6/lib/X11/rgb.txt which includes stuff like this:
man X(7) indicates: Quote: | An RGB Device specification is identified by the prefix
"rgb:" and has the following syntax:
rgb:<red>/<green>/<blue>
<red>, <green>, <blue> := h | hh | hhh | hhhh
h := single hexadecimal digits
Note that h indicates the value scaled in 4 bits, hh the
value scaled in 8 bits, hhh the value scaled in 12 bits,
and hhhh the value scaled in 16 bits, respectively. | What I don't understand is, how to find what color 'CC' equates to. Anyone have any ideas? I've tried Google, but
haven't hit the magic keywords yet. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
leej Apprentice
Joined: 18 May 2002 Posts: 280
|
Posted: Tue Jul 02, 2002 10:34 pm Post subject: Re: Fluxbox style making |
|
|
kanuslupus wrote: | What I don't understand is, how to find what color 'CC' equates to. Anyone have any ideas? I've tried Google, but
haven't hit the magic keywords yet. |
CC is merely the red value (in hex) part of the RGB value. CCh=204d
So CC/CC/CC =
204red/204green/204blue
Those three colour values combined result in a grey colour. If you've got KDE installed, kcolorchooser is a good tool to convert a hexadecimal RGB code into a visible colour. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed Jul 03, 2002 2:20 am Post subject: Re: Fluxbox style making |
|
|
leej wrote: | CC is merely the red value (in hex) part of the RGB value. | This part I understand, but I was hoping to find a conversion table or formula to come up with:
Quote: | If you've got KDE installed, kcolorchooser is a good tool to convert a hexadecimal RGB code into a visible colour. | Thanks for the tip, but I try to avoid KDE and accessories. I can't recall the steps to convert.
Maybe my real calculator will do that. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Wed Jul 03, 2002 2:30 am Post subject: Re: Fluxbox style making |
|
|
kanuslupus wrote: | This part I understand, but I was hoping to find a conversion table or formula to come up with:
|
It's just standard hexadecimal; i.e. converting base 10 (decimal) to base 16 (hex). Ask Google.
Code: | Dec Hex
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9 (confused yet? hee)
10 A
11 B
12 C
13 D
14 E
15 F |
So... how do I convert 171d to hex? Divide by sixteen. That yields 10, with a remainder of 11. So, 171d = ABh.
How do I convert ABh into decimal? A * 16 + B => 10 * 16 + 11 = 171d.
See? _________________ I don't believe in witty sigs. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed Jul 03, 2002 2:36 am Post subject: |
|
|
I knew it was simple... thank you. Has been too long since I've done any of that.
Maybe I should enroll in a class (and get the student discount for VMWare ) _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed Jul 03, 2002 4:14 am Post subject: |
|
|
If anyone else wants to know, Gimp also does the hex conversion. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|