If the default palette does not satisfy the application's color requirements, the application can create its own indexed palette by using the colors: class method. In the following example, a palette with 5 different levels of gray, from black to white is created:
|