Verified Commit 9dd43530 authored by Soren's avatar Soren

New ColorImpl to help with generifying

parent f88502a3
......@@ -19,6 +19,7 @@ private case class ColorImpl[C](c: C)(implicit colorFormat: ColorFormat[C]) exte
object Color {
def apply[C: ColorFormat](c: C): Color = ColorImpl(c)
def unapply[C: ColorFormat](arg: Color): Option[C] = arg match {
case ColorImpl(c: C) => Some(c)
case _ => None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment