Java Integer to intToColour(int colour)

Here you can find the source of intToColour(int colour)

Description

int To Colour

License

Open Source License

Declaration

public static String intToColour(int colour) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String intToColour(int colour) {
        switch (colour) {
        case 1://from  w w  w  .j  av  a 2s. com
            return "red";
        case 2:
            return "darkgreen";
        case 3:
            return "brown";
        case 4:
            return "darkblue";
        case 5:
            return "purple";
        case 6:
            return "cyan";
        case 7:
            return "lightgrey";
        case 8:
            return "grey";
        case 9:
            return "pink";
        case 10:
            return "lime";
        case 11:
            return "yellow";
        case 12:
            return "lightblue";
        case 13:
            return "magenta";
        case 14:
            return "orange";
        case 16:
            return "random";
        default:
            return "black";
        }
    }
}

Related

  1. intToBigEndianByteArray(int in)
  2. intToBlue(int color)
  3. IntToBuf2BE(int val, byte[] buf, int offset)
  4. intToBuffer(int i, byte[] ioBuffer)
  5. intToCodeString(int value)
  6. intToCols(int i)
  7. intToColumnName(int column)
  8. intToDateString(int i)
  9. intToDay(int d)