spice-0.1.2.1: An FRP-based game engine written in Haskell.

Safe HaskellNone
LanguageHaskell2010

FRP.Spice.Graphics.Color

Description

This module provides an abstraction over the default representations of color in the Haskell OpenGL bindings.

Synopsis

Documentation

data Color Source

Representing a Color using four Float representing reg, green, blue, and the alpha mask respectively. The Floats are in a range from 0-1, representing Ints from 0-255.

Constructors

Color 

Instances

bindColor :: Color -> IO () Source

Changes the current OpenGL context's rendering color to the Color specified.

color4f :: Float -> Float -> Float -> Float -> Color Source

A synonym for the Color constructor.

color3f :: Float -> Float -> Float -> Color Source

Constructing a Color from 3 Floats, defaulting the alpha mask to 1.0.

color4i :: Int -> Int -> Int -> Int -> Color Source

Creating a Color from 4 Ints. The ints, similarly to color4f represent red, green, blue, and the alpha mask respectively. The ints should be in the range of 0-255. (Note: color4i is functionally equivalent (and also equivalent in source code) to calling color4f with each of its arguments divided by 255.)

color3i :: Int -> Int -> Int -> Color Source

Constructing a Color from 3 Ints, defaulting the alpha mask to 255.

black :: Color Source

The color black.

white :: Color Source

The color white.

red :: Color Source

The color red.

green :: Color Source

The color green.

blue :: Color Source

The color blue.