Language Reference » Misc functions » loadPalette
loadPalette - Load a color scheme and apply it
This function allows you to load a color scheme from a flat file or an internet location. You can specify it the loaded palette will be appended to the current one or if it will overwrite the current color scheme.
Calling this function
FileName is the name of the file to load. It can be a local path or a remote location.
Overwrite is an optional parameter. Set to TRUE it will overwrite the current palette.
What is a color scheme
A color scheme is a text file containing a list of colors. Colors are composed of their Red, Green, Blue and Alpha properties. To create your own color scheme, just create a CSV file using a coma as delimiter between the parameters and a carriage return to separate the colors :
239,210,121,100 149,203,233,100 2,71,105,100 175,215,117,100 44,87,0,100 222,157,127,100
/* Create the pData object */ $MyData = new pData(); /* Will append the "autumn" palette to the current one */ $MyData->loadPalette("palettes/autumn.color"); /* Will replace the whole color scheme by the "desert" palette */ $MyData->loadPalette("palettes/desert.color", TRUE);
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 409 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.