Blitz Lab:

Voting Booth

What planning do you do before starting a project?

  Design methodology
  Note down ideas
  Jump straight in!


view results  past polls



Site Index

This site is best viewed
in IE 5.5 and above!

Blitz Lab - Colour Space Library V2.01+, blitz basic, blitz, blitz basic resources, blitz basic libraries, blitz basic code, blitz resources, colour wheels, color wheels, colour conversion, color conversion, hsv, hsb, rgb, games programming, developer resources, develeloper links, games development, colour space, color space, colour models, color models, Aurora-Soft.

 Blitz Lab - Colour Space Library V2.01+


The HSV colour system is the main feature of this library. It is based on the colour wheel and has many exciting uses and possibilities (see below).

What Is HSV?
Click here for a quick introduction to HSV colour.

The Colour Space library includes:view bigger image

  • Functions to convert between HSV (Hue Saturation Value) & RGB (Red, Green Blue) colour.
  • Functions to extract Red, Green & Blue components from an RGB value & vice versa.
  • A Function to convert hex strings (i.e. from user input) to integer values.
  • Document: "Why Use HSV?"
  • Demo programs illustrating some uses of HSV (see below).
  • Full source code for library & demo programs.

New in Version 2.01+:view bigger image

  • Functions to draw colour bars, colour wheels & brightness bars.
  • Functions to get specific colours from the above colour selectors (e.g. from a mouse click).
  • Bug fixes & optimisations ;-)
  • New demo program utilising these new functions to create a simple palette requester (see below).
  • Demo programs now have Blitz Plus versions.

Download the latest version

 Some Uses of HSV


HSV Demo 1
Because the hue (colour) is represented by a single value it makes it very easy to filter out certain colours regardless of their brightness. This allows you to change one colour to another by adding/subtracting the difference in Hue. For example, you can have one set of sprite graphics and dynamically build a new set for each player in a different colour (even a colour selected by the players themselves).

HSV Demo 2
Also, because it uses the colour wheel, it is a very useful for determining contrasting and complementary colours. The opposite colour on the colour wheel is a good contrasting colour. The colours either side (30 degrees) of the opposite make good complementary colours.

HSV Demo 3
HSV is also essential for doing any kind of palette functionality. This third demo displays a colour wheel for the Hue & Saturation with an additional bar for the Value. The HSV & RGB values of the selected colour are also displayed.

I could waffle on for hours, but if you really want to see what it does, download it and see for yourself...

If you are still learning to program in Blitz, I recommend you also read the Modular Programming & Libraries article which will not only explain about using libraries like this, but also show you how to make your own.



home | games | blitz lab | dot net | links | downloads | contact us