Java Color From toColor(boolean val)

Here you can find the source of toColor(boolean val)

Description

to Color

License

Open Source License

Declaration

public static int toColor(boolean val) 

Method Source Code

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

public class Main {
    public static int toColor(boolean val) {
        return (val) ? 0x00ff00 : 0xff0000;
    }/* ww  w.ja  v  a 2  s .c o m*/
}

Related

  1. toColor(String hexString)
  2. toColor(String str)