--
-- Copyright (c) 2012 Kevin Wellwood
-- All rights reserved.
--
-- This source code is distributed under the Modified BSD License. For terms and
-- conditions, see license.txt.
--
package Themes.Palette is
-- This is the Tango color theme
-- http://tango.freedesktop.org/
--
-- Adobe Kuler
-- http://kuler.adobe.com/
type Base_Color is (
Black, White,
Transparent, Magenta,
Butter1, Butter2, Butter3,
Orange1, Orange2, Orange3,
Chocolate1, Chocolate2, Chocolate3,
Chameleon1, Chameleon2, Chameleon3,
Skyblue1, Skyblue2, Skyblue3,
Plum1, Plum2, Plum3,
Scarlet1, Scarlet2, Scarlet3,
Chrome1, Chrome2, Chrome3,
Chrome4, Chrome5, Chrome6
);
type Base_Colors_Array is array(Base_Color) of Allegro_Color;
-- Initialize must be called before base_colors can be used.
base_colors : Base_Colors_Array;
----------------------------------------------------------------------------
-- Initializes the base_colors array. This can't be called until the Allegro
-- color depth has been set.
procedure Initialize;
----------------------------------------------------------------------------
-- Color manipulation functions
-- Returns True if the colors compare within tolerance bounds. If any of the
-- components of the colors differ by more than 'tolerance', the comparison
-- will fail
function Compare( a, b : Allegro_Color; tolerance : Natural := 0 ) return Boolean;
-- Returns the foreground color adjusted for contrast against the background.
function Contrast( fg, bg : Allegro_Color; ratio : Float := 1.75 ) return Allegro_Color;
-- Returns white or black, depending on the brightness of the background.
function Hard_Contrast( bg : Allegro_Color ) return Allegro_Color;
-- Returns a color which is lighter or darker than the input. The color will
-- be darker where 0 < factor < 1 and lighter where factor > 1.
function Lighten( color : Allegro_Color; factor : Float ) return Allegro_Color;
function Make_Grey( brightness : Natural ) return Allegro_Color;
end Themes.Palette;