Skip to content

Commit

Permalink
Updates for latest Scala nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Nov 6, 2023
1 parent e1d5b4a commit 7fad7d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/conversions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ object Rgb24Opaque:
def asInt: Int = color

def hex: Text = Text:
IArray(red, green, blue).foldLeft("#"): (acc, c) =>
List(red, green, blue).foldLeft("#"): (acc, c) =>
acc+(c.hex.pipe { s => if s.s.length < 2 then "0"+s else s })

object Rgb32Opaque:
Expand Down Expand Up @@ -124,7 +124,7 @@ object Rgb12Opaque:
def red: Int = (color >> 8)&15
def green: Int = (color >> 4)&15
def blue: Int = color&15
def hex: Text = Text("#"+IArray(red, green, blue).map(_.hex).mkString)
def hex: Text = Text("#"+List(red, green, blue).map(_.hex).mkString)
def srgb: Srgb = Srgb(red/15.0, green/15.0, blue/15.0)

export Rgb12Opaque.Rgb12
Expand Down

0 comments on commit 7fad7d5

Please sign in to comment.