All Downloads are FREE. Search and download functionalities are using the official Maven repository.

be.doeraene.webcomponents.ui5.scaladsl.colour.RGBColour.scala Maven / Gradle / Ivy

The newest version!
package be.doeraene.webcomponents.ui5.scaladsl.colour

import scala.language.implicitConversions
import scala.util.Random

final case class RGBColour(red: Int, green: Int, blue: Int) extends Colour {
  def alpha: Double                        = 1
  def withAlpha(alpha: Double): RGBAColour = RGBAColour(red, green, blue, alpha)
  def withoutAlpha: RGBColour              = this
  def asRGBAColour: RGBAColour             = withAlpha(1.0)
}

object RGBColour {

  implicit def asRGBA(rgb: RGBColour): RGBAColour = rgb.withAlpha(1.0)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy