Since I recently had a bit of free time I decided to practice C a bit
an extension with color classes for ruby in C and ruby.
Color is a collection of classes to deal with colors. To
create, compare, store and manipulate them.
At the moment I try to get in contact with Austin Z. in order to
with the color gem he currently provides.
Until then you can get the beta here:
To install it, download the gem and then type: gem install
I hope for some response, I’m especially looking for input on:
-The C code: since this is only my second extension written in C with
almost no prior
C experience, input on the C code is most welcome.
-Common#distance: Ideas for a perceptional distance. Also an open
question is, whether it should include alpha or not.
Personally I’m against including alpha (even though the
current implementation includes it).
My current thoughts go towards using cylindrical HSV with hue
-Color spaces/management: If there are people with knowledge
about color spaces, please bring it on. Color spaces are
required to make meaningful transformations between different color
models, unlike the current purely theoretical implementations
which are of little use in real applications. They are also
required to do transformations to CIE XYZ/Lab.
-Higher accuracy: The C implementation of RGB and CMYK both work
with 8 bit per component, but there are e.g. already scanners
which can deliver 12 bit per component. Is that a requirement?
If yes, separate classes for that or beef up the existing ones?
-#blend: alternative algorithms and general input
-Missing features - tell me what you’d like to have.
Please notice that it is still beta. There is still stuff I have in mind
(e.g. port the test-units to the current setup and write more of them)