Kotlin Enum Initialization


Example

Enum classes as any other classes can have a constructor and be initialized

enum class Color(val rgb: Int) {
    RED(0xFF0000),
    GREEN(0x00FF00),
    BLUE(0x0000FF)
}