Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fluxbox style making
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Tue Jul 02, 2002 9:54 pm    Post subject: Fluxbox style making Reply with quote

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:
Code:
255 250 250             snow

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
View user's profile Send private message
leej
Apprentice
Apprentice


Joined: 18 May 2002
Posts: 280

PostPosted: Tue Jul 02, 2002 10:34 pm    Post subject: Re: Fluxbox style making Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Jul 03, 2002 2:20 am    Post subject: Re: Fluxbox style making Reply with quote

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:
CCh=204d


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
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Wed Jul 03, 2002 2:30 am    Post subject: Re: Fluxbox style making Reply with quote

kanuslupus wrote:
This part I understand, but I was hoping to find a conversion table or formula to come up with:
Quote:
CCh=204d


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? :D
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Jul 03, 2002 2:36 am    Post subject: Reply with quote

:oops:
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 :D)
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Jul 03, 2002 4:14 am    Post subject: Reply with quote

If anyone else wants to know, Gimp also does the hex conversion.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum