Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Converting large amount of colors  (Read 2409 times)

0 Members and 1 Guest are viewing this topic.

Ryder17z

    Topic Starter


    Intermediate
  • Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Converting large amount of colors
« on: March 15, 2011, 01:56:05 PM »
Hello

I have a list of 121 colors in RGBA format saved in a text file which i want to convert to HSB where alpha would be used for brightness (and save the colors in another file)

Is there an easy way to do that?
The cake is a lie...

Ryder17z

    Topic Starter


    Intermediate
  • Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: Converting large amount of colors
« Reply #1 on: March 29, 2011, 02:43:00 PM »
I guess not?..
The cake is a lie...

Salmon Trout

  • Guest
Re: Converting large amount of colors
« Reply #2 on: March 29, 2011, 03:39:09 PM »
You want to convert between a color value in RGB (three integer values in the range 0 to 255 representing red, green, and blue) and HSB (three floating point values in the range 0 to 1.0 representing hue, saturation, and brightness)?

http://www.exampledepot.com/egs/java.awt/color_Hsb.html

 

Ryder17z

    Topic Starter


    Intermediate
  • Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: Converting large amount of colors
« Reply #3 on: March 29, 2011, 05:52:50 PM »
Partly, let me give an example:

RGBA:
R: 31
G: 97
B: 88
A: 100

HSL:
H: 155
S: 124
L: 100

(L and A matches, as you can see)

Note: These values ranges from 0 to 255
The cake is a lie...

Ryder17z

    Topic Starter


    Intermediate
  • Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: Converting large amount of colors
« Reply #4 on: April 11, 2011, 10:12:42 AM »
Sorry for double post, but, i got it solved
The cake is a lie...