Login Register Wishes Forum About
Language Reference » Misc functions » loadPalette
Help topics
Latest updates
4693d  replaceImageMapTitle
4693d  replaceImageMapValues
4693d  createFunctionSerie
4693d  setAbsicssaPosition
4693d  negateValues
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
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
Where :

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 :

Sample script

 /* Create the pData object */
 $MyData = new pData(); 

 /* Will append the "autumn" palette to the current one */

 /* Will replace the whole color scheme by the "desert" palette */
 $MyData->loadPalette("palettes/desert.color", TRUE);
Last updated on 11/04/2009 
by Jean-Damien 
Linked resources
Community comments
  No comments have been posted yet.
© Copyrights
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. 415 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.