0 | module Text.SVG.Types
   1 |
   2 | import Data.Bits
   3 | import Derive.Prelude
   4 | import public Data.Refined
   5 |
   6 | %default total
   7 | %language ElabReflection
   8 |
   9 | ||| Prints a floating point number, removing the trailing `".0"`
  10 | ||| in case it's an integer.
  11 | export
  12 | renderDouble : Double -> String
  13 | renderDouble d =
  14 |   let s := show d
  15 |    in case [<] <>< unpack s of
  16 |         (h :< '.' :< '0') => pack (h <>> [])
  17 |         _                 => s
  18 |
  19 | %inline
  20 | Interpolation Double where interpolate = renderDouble
  21 |
  22 | public export
  23 | data SVGAngle : Type where
  24 |   Deg  : Double -> SVGAngle
  25 |   Rad  : Double -> SVGAngle
  26 |   Grad : Double -> SVGAngle
  27 |
  28 | export
  29 | Interpolation SVGAngle where
  30 |   interpolate (Deg x)  = renderDouble x ++ "deg"
  31 |   interpolate (Rad x)  = renderDouble x ++ "rad"
  32 |   interpolate (Grad x) = renderDouble x ++ "grad"
  33 |
  34 | export %inline
  35 | deg : Cast SVGAngle a => Double -> a
  36 | deg = cast . Deg
  37 |
  38 | export %inline
  39 | rad : Cast SVGAngle a => Double -> a
  40 | rad = cast . Rad
  41 |
  42 | export %inline
  43 | grad : Cast SVGAngle a => Double -> a
  44 | grad = cast . Grad
  45 |
  46 | export %inline
  47 | (.deg) : Cast SVGAngle a => Double -> a
  48 | (.deg) = cast . Deg
  49 |
  50 | export %inline
  51 | (.rad) : Cast SVGAngle a => Double -> a
  52 | (.rad) = cast . Rad
  53 |
  54 | export %inline
  55 | (.grad) : Cast SVGAngle a => Double -> a
  56 | (.grad) = cast . Grad
  57 |
  58 | --------------------------------------------------------------------------------
  59 | --          Percentage
  60 | --------------------------------------------------------------------------------
  61 |
  62 | public export
  63 | IsPercentage : Double -> Bool
  64 | IsPercentage x = 0 <= x && x <= 100
  65 |
  66 | ||| A floating point percentage value in the the
  67 | ||| range [0,100].
  68 | public export
  69 | record Percentage where
  70 |   constructor MkPercentage
  71 |   value : Double
  72 |   {auto 0 prf : Holds IsPercentage value}
  73 |
  74 | %runElab derive "Percentage" [Show,Eq,Ord]
  75 |
  76 | export
  77 | Interpolation Percentage where
  78 |   interpolate (MkPercentage v) = renderDouble v ++ "%"
  79 |
  80 | ||| Convenience function for creating percentages with little
  81 | ||| syntactic overhead.
  82 | |||
  83 | ||| ```idris example
  84 | ||| perc 12
  85 | ||| ```
  86 | export %inline
  87 | perc :
  88 |      {auto _ : Cast Percentage a}
  89 |   -> (v : Double)
  90 |   -> {auto 0 prf : Holds IsPercentage v}
  91 |   -> a
  92 | perc v = cast $ MkPercentage v
  93 |
  94 | ||| Convenience function for creating percentages with little
  95 | ||| syntactic overhead.
  96 | |||
  97 | ||| ```idris example
  98 | ||| 12.perc
  99 | ||| ```
 100 | export %inline
 101 | (.perc) :
 102 |      {auto _ : Cast Percentage a}
 103 |   -> (v : Double)
 104 |   -> {auto 0 prf : Holds IsPercentage v}
 105 |   -> a
 106 | (.perc) v = cast $ MkPercentage v
 107 |
 108 | --------------------------------------------------------------------------------
 109 | --          SVGColor
 110 | --------------------------------------------------------------------------------
 111 |
 112 | hexc : Bits8 -> Char
 113 | hexc 0  = '0'
 114 | hexc 1  = '1'
 115 | hexc 2  = '2'
 116 | hexc 3  = '3'
 117 | hexc 4  = '4'
 118 | hexc 5  = '5'
 119 | hexc 6  = '6'
 120 | hexc 7  = '7'
 121 | hexc 8  = '8'
 122 | hexc 9  = '9'
 123 | hexc 10 = 'a'
 124 | hexc 11 = 'b'
 125 | hexc 12 = 'c'
 126 | hexc 13 = 'd'
 127 | hexc 14 = 'e'
 128 | hexc _  = 'f'
 129 |
 130 | hex : Bits8 -> List Char
 131 | hex b = [hexc $ shiftR b 4, hexc $ b .&. 0xf]
 132 |
 133 | public export
 134 | data SVGColor : Type where
 135 |   RGB  : (red,green,blue : Bits8) -> SVGColor
 136 |   RGBA : (red,green,blue : Bits8) -> Percentage -> SVGColor
 137 |   Key  : String -> SVGColor
 138 |
 139 | export
 140 | Interpolation SVGColor where
 141 |   interpolate (RGB r g b)    = fastPack $ '#' :: hex r ++ hex g ++ hex b
 142 |   interpolate (RGBA r g b a) = "rgba(\{show r} \{show g} \{show b} \{a})"
 143 |   interpolate (Key s)        = s
 144 |
 145 | export
 146 | Show SVGColor where show = interpolate
 147 |
 148 | --------------------------------------------------------------------------------
 149 | --          Length
 150 | --------------------------------------------------------------------------------
 151 |
 152 | public export
 153 | data Length : Type where
 154 |   U        : Double -> Length
 155 |   Pt       : Double -> Length
 156 |   Px       : Double -> Length
 157 |   Mm       : Double -> Length
 158 |   Cm       : Double -> Length
 159 |
 160 | export
 161 | Interpolation Length where
 162 |   interpolate (U x)  =  renderDouble x
 163 |   interpolate (Pt x)  = renderDouble x ++ "pt"
 164 |   interpolate (Px x)  = renderDouble x ++ "px"
 165 |   interpolate (Mm x)  = renderDouble x ++ "mm"
 166 |   interpolate (Cm x)  = renderDouble x ++ "cm"
 167 |
 168 | export %inline
 169 | u : Cast Length a => Double -> a
 170 | u = cast . U
 171 |
 172 | export %inline
 173 | mm : Cast Length a => Double -> a
 174 | mm = cast . Mm
 175 |
 176 | export %inline
 177 | cm : Cast Length a => Double -> a
 178 | cm = cast . Cm
 179 |
 180 | export %inline
 181 | px : Cast Length a => Double -> a
 182 | px = cast . Px
 183 |
 184 | export %inline
 185 | pt : Cast Length a => Double -> a
 186 | pt = cast . Pt
 187 |
 188 | export %inline
 189 | (.u) : Cast Length a => Double -> a
 190 | (.u) = cast . U
 191 |
 192 | export %inline
 193 | (.mm) : Cast Length a => Double -> a
 194 | (.mm) = cast . Mm
 195 |
 196 | export %inline
 197 | (.cm) : Cast Length a => Double -> a
 198 | (.cm) = cast . Cm
 199 |
 200 | export %inline
 201 | (.px) : Cast Length a => Double -> a
 202 | (.px) = cast . Px
 203 |
 204 | export %inline
 205 | (.pt) : Cast Length a => Double -> a
 206 | (.pt) = cast . Pt
 207 |
 208 | --------------------------------------------------------------------------------
 209 | --          Length or Percent
 210 | --------------------------------------------------------------------------------
 211 |
 212 | public export
 213 | data LengthOrPercentage : Type where
 214 |   Len : Length -> LengthOrPercentage
 215 |   Per : Percentage -> LengthOrPercentage
 216 |
 217 | export
 218 | Interpolation LengthOrPercentage where
 219 |   interpolate (Len x) = interpolate x
 220 |   interpolate (Per x) = interpolate x
 221 |
 222 | export %inline
 223 | Cast Percentage LengthOrPercentage where cast = Per
 224 |
 225 | export %inline
 226 | Cast Length LengthOrPercentage where cast = Len
 227 |
 228 | --------------------------------------------------------------------------------
 229 | --          Paths
 230 | --------------------------------------------------------------------------------
 231 |
 232 | public export
 233 | data PathCmd : Type where
 234 |   Move  : (rel : Bool) -> (x,y : Double) -> PathCmd
 235 |   Line  : (rel : Bool) -> (x,y : Double) -> PathCmd
 236 |   Horiz : (rel : Bool) -> (x : Double) -> PathCmd
 237 |   Vert  : (rel : Bool) -> (y : Double) -> PathCmd
 238 |   Z     : PathCmd
 239 |   Quadr : (rel : Bool) -> (x1,y1,x,y : Double) -> PathCmd
 240 |   QSucc : (rel : Bool) -> (x,y : Double) -> PathCmd
 241 |   Cubic : (rel : Bool) -> (x1,y1,x2,y2,x,y : Double) -> PathCmd
 242 |   CSucc : (rel : Bool) -> (x2,y2,x,y : Double) -> PathCmd
 243 |   Arc   :
 244 |        (rel : Bool)
 245 |     -> (rx,ry,rot : Double)
 246 |     -> (largeArc,sweep : Bool)
 247 |     -> (x,y : Double)
 248 |     -> PathCmd
 249 |
 250 | letter : Bool -> String -> String -> String
 251 | letter False u l = u
 252 | letter True  u l = l
 253 |
 254 | digit : Bool -> String
 255 | digit False = "0"
 256 | digit True  = "1"
 257 |
 258 | export
 259 | Interpolation PathCmd where
 260 |   interpolate (Move rel x y) = letter rel "M" "m" ++ "\{x} \{y}"
 261 |   interpolate (Line rel x y) = letter rel "L" "l" ++ "\{x} \{y}"
 262 |   interpolate (Horiz rel x)  = letter rel "H" "h" ++ "\{x}"
 263 |   interpolate (Vert rel y)   = letter rel "V" "v" ++ "\{y}"
 264 |   interpolate Z              = "Z"
 265 |   interpolate (QSucc rel x y) =
 266 |     letter rel "T" "t" ++ "\{x} \{y}"
 267 |   interpolate (CSucc rel x2 y2 x y) =
 268 |     letter rel "S" "s" ++ "\{x2} \{y2},\{x} \{y}"
 269 |   interpolate (Quadr rel x1 y1 x y) =
 270 |     letter rel "Q" "q" ++ "\{x1} \{y1},\{x} \{y}"
 271 |   interpolate (Cubic rel x1 y1 x2 y2 x y) =
 272 |     letter rel "C" "c" ++ "\{x1} \{y1},\{x2} \{y2},\{x} \{y}"
 273 |   interpolate (Arc rel rx ry rot l s x y) =
 274 |     letter rel "A" "a" ++ "\{rx} \{ry} \{rot} \{digit l} \{digit s} \{x} \{y}"
 275 |
 276 | namespace Path
 277 |   export %inline
 278 |   M : (x,y : Double) -> PathCmd
 279 |   M = Move False
 280 |
 281 |   export %inline
 282 |   m : (x,y : Double) -> PathCmd
 283 |   m = Move True
 284 |
 285 |   export %inline
 286 |   L : (x,y : Double) -> PathCmd
 287 |   L = Line False
 288 |
 289 |   export %inline
 290 |   l : (x,y : Double) -> PathCmd
 291 |   l = Line True
 292 |
 293 |   export %inline
 294 |   H : (x : Double) -> PathCmd
 295 |   H = Horiz False
 296 |
 297 |   export %inline
 298 |   h : (x : Double) -> PathCmd
 299 |   h = Horiz True
 300 |
 301 |   export %inline
 302 |   V : (x : Double) -> PathCmd
 303 |   V = Vert False
 304 |
 305 |   export %inline
 306 |   v : (x : Double) -> PathCmd
 307 |   v = Vert True
 308 |
 309 |   export %inline
 310 |   S : (x2,y2,x,y : Double) -> PathCmd
 311 |   S = CSucc False
 312 |
 313 |   export %inline
 314 |   s : (x2,y2,x,y : Double) -> PathCmd
 315 |   s = CSucc True
 316 |
 317 |   export %inline
 318 |   C : (x1,y1,x2,y2,x,y : Double) -> PathCmd
 319 |   C = Cubic False
 320 |
 321 |   export %inline
 322 |   c : (x1,y1,x2,y2,x,y : Double) -> PathCmd
 323 |   c = Cubic True
 324 |
 325 |   export %inline
 326 |   T : (x,y : Double) -> PathCmd
 327 |   T = QSucc False
 328 |
 329 |   export %inline
 330 |   t : (x,y : Double) -> PathCmd
 331 |   t = QSucc True
 332 |
 333 |   export %inline
 334 |   Q : (x1,y1,x,y : Double) -> PathCmd
 335 |   Q = Quadr False
 336 |
 337 |   export %inline
 338 |   q : (x1,y1,x,y : Double) -> PathCmd
 339 |   q = Quadr True
 340 |
 341 |   export %inline
 342 |   A   :
 343 |        (rx,ry,rot : Double)
 344 |     -> (largeArc,sweep : Bool)
 345 |     -> (x,y : Double)
 346 |     -> PathCmd
 347 |   A = Arc False
 348 |
 349 |   export %inline
 350 |   a   :
 351 |        (rx,ry,rot : Double)
 352 |     -> (largeArc,sweep : Bool)
 353 |     -> (x,y : Double)
 354 |     -> PathCmd
 355 |   a = Arc True
 356 |
 357 | --------------------------------------------------------------------------------
 358 | --          Strokes
 359 | --------------------------------------------------------------------------------
 360 |
 361 | public export
 362 | data StrokeLinecap = Butt | Round | Square
 363 |
 364 | export
 365 | Interpolation StrokeLinecap where
 366 |   interpolate Butt   = "butt"
 367 |   interpolate Round  = "round"
 368 |   interpolate Square = "square"
 369 |
 370 | namespace StrokeLinejoin
 371 |   public export
 372 |   data StrokeLinejoin = Miter | Round | Bevel
 373 |
 374 |   export
 375 |   Interpolation StrokeLinejoin where
 376 |     interpolate Miter   = "miter"
 377 |     interpolate Round   = "round"
 378 |     interpolate Bevel   = "bevel"
 379 |
 380 | --------------------------------------------------------------------------------
 381 | --          Text
 382 | --------------------------------------------------------------------------------
 383 |
 384 | public export
 385 | data TextAnchor = Start | Middle | End
 386 |
 387 | export
 388 | Interpolation TextAnchor where
 389 |   interpolate Start  = "start"
 390 |   interpolate Middle = "middle"
 391 |   interpolate End    = "end"
 392 |
 393 | namespace DominantBaselie
 394 |   public export
 395 |   data DominantBaseline : Type where
 396 |     Auto           : DominantBaseline
 397 |     Ideographic    : DominantBaseline
 398 |     Alphabetic     : DominantBaseline
 399 |     Hanging        : DominantBaseline
 400 |     Mathematical   : DominantBaseline
 401 |     Middle         : DominantBaseline
 402 |     Central        : DominantBaseline
 403 |     TextAfterEdge  : DominantBaseline
 404 |     TextBeforeEdge : DominantBaseline
 405 |     TextBottom     : DominantBaseline
 406 |     TextTop        : DominantBaseline
 407 |
 408 |   export
 409 |   Interpolation DominantBaseline where
 410 |     interpolate Auto           = "auto"
 411 |     interpolate Ideographic    = "ideographic"
 412 |     interpolate Alphabetic     = "alphabetic"
 413 |     interpolate Hanging        = "hanging"
 414 |     interpolate Mathematical   = "mathematical"
 415 |     interpolate Middle         = "middle"
 416 |     interpolate Central        = "central"
 417 |     interpolate TextAfterEdge  = "text-after-edge"
 418 |     interpolate TextBeforeEdge = "text-before-edge"
 419 |     interpolate TextBottom     = "text-bottom"
 420 |     interpolate TextTop        = "text-top"
 421 |
 422 | public export
 423 | data FontWeight : Type where
 424 |   Normal  : FontWeight
 425 |   Bold    : FontWeight
 426 |   Bolder  : FontWeight
 427 |   Lighter : FontWeight
 428 |   Val     : Double -> FontWeight
 429 |
 430 | export
 431 | Interpolation FontWeight where
 432 |   interpolate Normal  = "normal"
 433 |   interpolate Bold    = "bold"
 434 |   interpolate Bolder  = "bolder"
 435 |   interpolate Lighter = "lighter"
 436 |   interpolate (Val x) = renderDouble x
 437 |
 438 | export
 439 | data LengthAdjust = Spacing | SpacingAndGlyphs
 440 |
 441 | export
 442 | Interpolation LengthAdjust where
 443 |   interpolate Spacing          = "spacing"
 444 |   interpolate SpacingAndGlyphs = "spacingAndGlyphs"
 445 |
 446 | --------------------------------------------------------------------------------
 447 | --          Transformations
 448 | --------------------------------------------------------------------------------
 449 |
 450 | public export
 451 | data Transform : Type where
 452 |   Translate : (dx,dy : Double) -> Transform
 453 |   Rotate    : (angle : Double) -> Transform
 454 |   Scale     : (x,y   : Double) -> Transform
 455 |   Matrix    : (a,b,c,d,e,f : Double) -> Transform
 456 |
 457 | export
 458 | Interpolation Transform where
 459 |   interpolate (Translate dx dy)    = "translate(\{dx},\{dy})"
 460 |   interpolate (Rotate angle)       = "rotate(\{angle})"
 461 |   interpolate (Scale x y)          = "scale(\{x},\{y})"
 462 |   interpolate (Matrix a b c d e f) = "matrix(\{a},\{b},\{c},\{d},\{e},\{f})"
 463 |
 464 | --------------------------------------------------------------------------------
 465 | --          X11 Colors (https://www.w3.org/TR/css3-color/#svg-color)
 466 | --------------------------------------------------------------------------------
 467 |
 468 | export
 469 | none : SVGColor
 470 | none = Key "none"
 471 |
 472 | export
 473 | aliceblue : SVGColor
 474 | aliceblue = Key "aliceblue"
 475 |
 476 | export
 477 | antiquewhite : SVGColor
 478 | antiquewhite = Key "antiquewhite"
 479 |
 480 | export
 481 | aqua : SVGColor
 482 | aqua = Key "aqua"
 483 |
 484 | export
 485 | aquamarine : SVGColor
 486 | aquamarine = Key "aquamarine"
 487 |
 488 | export
 489 | azure : SVGColor
 490 | azure = Key "azure"
 491 |
 492 | export
 493 | beige : SVGColor
 494 | beige = Key "beige"
 495 |
 496 | export
 497 | bisque : SVGColor
 498 | bisque = Key "bisque"
 499 |
 500 | export
 501 | blanchedalmond : SVGColor
 502 | blanchedalmond = Key "blanchedalmond"
 503 |
 504 | export
 505 | black : SVGColor
 506 | black = Key "black"
 507 |
 508 | export
 509 | blue : SVGColor
 510 | blue = Key "blue"
 511 |
 512 | export
 513 | blueviolet : SVGColor
 514 | blueviolet = Key "blueviolet"
 515 |
 516 | export
 517 | brown : SVGColor
 518 | brown = Key "brown"
 519 |
 520 | export
 521 | burlywood : SVGColor
 522 | burlywood = Key "burlywood"
 523 |
 524 | export
 525 | cadetblue : SVGColor
 526 | cadetblue = Key "cadetblue"
 527 |
 528 | export
 529 | chartreuse : SVGColor
 530 | chartreuse = Key "chartreuse"
 531 |
 532 | export
 533 | chocolate : SVGColor
 534 | chocolate = Key "chocolate"
 535 |
 536 | export
 537 | coral : SVGColor
 538 | coral = Key "coral"
 539 |
 540 | export
 541 | cornflowerblue : SVGColor
 542 | cornflowerblue = Key "cornflowerblue"
 543 |
 544 | export
 545 | cornsilk : SVGColor
 546 | cornsilk = Key "cornsilk"
 547 |
 548 | export
 549 | crimson : SVGColor
 550 | crimson = Key "crimson"
 551 |
 552 | export
 553 | cyan : SVGColor
 554 | cyan = Key "cyan"
 555 |
 556 | export
 557 | darkblue : SVGColor
 558 | darkblue = Key "darkblue"
 559 |
 560 | export
 561 | darkcyan : SVGColor
 562 | darkcyan = Key "darkcyan"
 563 |
 564 | export
 565 | darkgoldenrod : SVGColor
 566 | darkgoldenrod = Key "darkgoldenrod"
 567 |
 568 | export
 569 | darkgray : SVGColor
 570 | darkgray = Key "darkgray"
 571 |
 572 | export
 573 | darkgreen : SVGColor
 574 | darkgreen = Key "darkgreen"
 575 |
 576 | export
 577 | darkgrey : SVGColor
 578 | darkgrey = Key "darkgrey"
 579 |
 580 | export
 581 | darkkhaki : SVGColor
 582 | darkkhaki = Key "darkkhaki"
 583 |
 584 | export
 585 | darkmagenta : SVGColor
 586 | darkmagenta = Key "darkmagenta"
 587 |
 588 | export
 589 | darkolivegreen : SVGColor
 590 | darkolivegreen = Key "darkolivegreen"
 591 |
 592 | export
 593 | darkorange : SVGColor
 594 | darkorange = Key "darkorange"
 595 |
 596 | export
 597 | darkorchid : SVGColor
 598 | darkorchid = Key "darkorchid"
 599 |
 600 | export
 601 | darkred : SVGColor
 602 | darkred = Key "darkred"
 603 |
 604 | export
 605 | darksalmon : SVGColor
 606 | darksalmon = Key "darksalmon"
 607 |
 608 | export
 609 | darkseagreen : SVGColor
 610 | darkseagreen = Key "darkseagreen"
 611 |
 612 | export
 613 | darkslateblue : SVGColor
 614 | darkslateblue = Key "darkslateblue"
 615 |
 616 | export
 617 | darkslategray : SVGColor
 618 | darkslategray = Key "darkslategray"
 619 |
 620 | export
 621 | darkslategrey : SVGColor
 622 | darkslategrey = Key "darkslategrey"
 623 |
 624 | export
 625 | darkturquoise : SVGColor
 626 | darkturquoise = Key "darkturquoise"
 627 |
 628 | export
 629 | darkviolet : SVGColor
 630 | darkviolet = Key "darkviolet"
 631 |
 632 | export
 633 | deeppink : SVGColor
 634 | deeppink = Key "deeppink"
 635 |
 636 | export
 637 | deepskyblue : SVGColor
 638 | deepskyblue = Key "deepskyblue"
 639 |
 640 | export
 641 | dimgray : SVGColor
 642 | dimgray = Key "dimgray"
 643 |
 644 | export
 645 | dimgrey : SVGColor
 646 | dimgrey = Key "dimgrey"
 647 |
 648 | export
 649 | dodgerblue : SVGColor
 650 | dodgerblue = Key "dodgerblue"
 651 |
 652 | export
 653 | firebrick : SVGColor
 654 | firebrick = Key "firebrick"
 655 |
 656 | export
 657 | floralwhite : SVGColor
 658 | floralwhite = Key "floralwhite"
 659 |
 660 | export
 661 | forestgreen : SVGColor
 662 | forestgreen = Key "forestgreen"
 663 |
 664 | export
 665 | fuchsia : SVGColor
 666 | fuchsia = Key "fuchsia"
 667 |
 668 | export
 669 | gainsboro : SVGColor
 670 | gainsboro = Key "gainsboro"
 671 |
 672 | export
 673 | ghostwhite : SVGColor
 674 | ghostwhite = Key "ghostwhite"
 675 |
 676 | export
 677 | gold : SVGColor
 678 | gold = Key "gold"
 679 |
 680 | export
 681 | goldenrod : SVGColor
 682 | goldenrod = Key "goldenrod"
 683 |
 684 | export
 685 | gray : SVGColor
 686 | gray = Key "gray"
 687 |
 688 | export
 689 | green : SVGColor
 690 | green = Key "green"
 691 |
 692 | export
 693 | greenyellow : SVGColor
 694 | greenyellow = Key "greenyellow"
 695 |
 696 | export
 697 | grey : SVGColor
 698 | grey = Key "grey"
 699 |
 700 | export
 701 | honeydew : SVGColor
 702 | honeydew = Key "honeydew"
 703 |
 704 | export
 705 | hotpink : SVGColor
 706 | hotpink = Key "hotpink"
 707 |
 708 | export
 709 | indianred : SVGColor
 710 | indianred = Key "indianred"
 711 |
 712 | export
 713 | indigo : SVGColor
 714 | indigo = Key "indigo"
 715 |
 716 | export
 717 | ivory : SVGColor
 718 | ivory = Key "ivory"
 719 |
 720 | export
 721 | khaki : SVGColor
 722 | khaki = Key "khaki"
 723 |
 724 | export
 725 | lavender : SVGColor
 726 | lavender = Key "lavender"
 727 |
 728 | export
 729 | lavenderblush : SVGColor
 730 | lavenderblush = Key "lavenderblush"
 731 |
 732 | export
 733 | lawngreen : SVGColor
 734 | lawngreen = Key "lawngreen"
 735 |
 736 | export
 737 | lemonchiffon : SVGColor
 738 | lemonchiffon = Key "lemonchiffon"
 739 |
 740 | export
 741 | lightblue : SVGColor
 742 | lightblue = Key "lightblue"
 743 |
 744 | export
 745 | lightcoral : SVGColor
 746 | lightcoral = Key "lightcoral"
 747 |
 748 | export
 749 | lightcyan : SVGColor
 750 | lightcyan = Key "lightcyan"
 751 |
 752 | export
 753 | lightgoldenrodyellow : SVGColor
 754 | lightgoldenrodyellow = Key "lightgoldenrodyellow"
 755 |
 756 | export
 757 | lightgray : SVGColor
 758 | lightgray = Key "lightgray"
 759 |
 760 | export
 761 | lightgreen : SVGColor
 762 | lightgreen = Key "lightgreen"
 763 |
 764 | export
 765 | lightgrey : SVGColor
 766 | lightgrey = Key "lightgrey"
 767 |
 768 | export
 769 | lightpink : SVGColor
 770 | lightpink = Key "lightpink"
 771 |
 772 | export
 773 | lightsalmon : SVGColor
 774 | lightsalmon = Key "lightsalmon"
 775 |
 776 | export
 777 | lightseagreen : SVGColor
 778 | lightseagreen = Key "lightseagreen"
 779 |
 780 | export
 781 | lightskyblue : SVGColor
 782 | lightskyblue = Key "lightskyblue"
 783 |
 784 | export
 785 | lightslategray : SVGColor
 786 | lightslategray = Key "lightslategray"
 787 |
 788 | export
 789 | lightslategrey : SVGColor
 790 | lightslategrey = Key "lightslategrey"
 791 |
 792 | export
 793 | lightsteelblue : SVGColor
 794 | lightsteelblue = Key "lightsteelblue"
 795 |
 796 | export
 797 | lightyellow : SVGColor
 798 | lightyellow = Key "lightyellow"
 799 |
 800 | export
 801 | lime : SVGColor
 802 | lime = Key "lime"
 803 |
 804 | export
 805 | limegreen : SVGColor
 806 | limegreen = Key "limegreen"
 807 |
 808 | export
 809 | linen : SVGColor
 810 | linen = Key "linen"
 811 |
 812 | export
 813 | magenta : SVGColor
 814 | magenta = Key "magenta"
 815 |
 816 | export
 817 | maroon : SVGColor
 818 | maroon = Key "maroon"
 819 |
 820 | export
 821 | mediumaquamarine : SVGColor
 822 | mediumaquamarine = Key "mediumaquamarine"
 823 |
 824 | export
 825 | mediumblue : SVGColor
 826 | mediumblue = Key "mediumblue"
 827 |
 828 | export
 829 | mediumorchid : SVGColor
 830 | mediumorchid = Key "mediumorchid"
 831 |
 832 | export
 833 | mediumpurple : SVGColor
 834 | mediumpurple = Key "mediumpurple"
 835 |
 836 | export
 837 | mediumseagreen : SVGColor
 838 | mediumseagreen = Key "mediumseagreen"
 839 |
 840 | export
 841 | mediumslateblue : SVGColor
 842 | mediumslateblue = Key "mediumslateblue"
 843 |
 844 | export
 845 | mediumspringgreen : SVGColor
 846 | mediumspringgreen = Key "mediumspringgreen"
 847 |
 848 | export
 849 | mediumturquoise : SVGColor
 850 | mediumturquoise = Key "mediumturquoise"
 851 |
 852 | export
 853 | mediumvioletred : SVGColor
 854 | mediumvioletred = Key "mediumvioletred"
 855 |
 856 | export
 857 | midnightblue : SVGColor
 858 | midnightblue = Key "midnightblue"
 859 |
 860 | export
 861 | mintcream : SVGColor
 862 | mintcream = Key "mintcream"
 863 |
 864 | export
 865 | mistyrose : SVGColor
 866 | mistyrose = Key "mistyrose"
 867 |
 868 | export
 869 | moccasin : SVGColor
 870 | moccasin = Key "moccasin"
 871 |
 872 | export
 873 | navajowhite : SVGColor
 874 | navajowhite = Key "navajowhite"
 875 |
 876 | export
 877 | navy : SVGColor
 878 | navy = Key "navy"
 879 |
 880 | export
 881 | oldlace : SVGColor
 882 | oldlace = Key "oldlace"
 883 |
 884 | export
 885 | olive : SVGColor
 886 | olive = Key "olive"
 887 |
 888 | export
 889 | olivedrab : SVGColor
 890 | olivedrab = Key "olivedrab"
 891 |
 892 | export
 893 | orange : SVGColor
 894 | orange = Key "orange"
 895 |
 896 | export
 897 | orangered : SVGColor
 898 | orangered = Key "orangered"
 899 |
 900 | export
 901 | orchid : SVGColor
 902 | orchid = Key "orchid"
 903 |
 904 | export
 905 | palegoldenrod : SVGColor
 906 | palegoldenrod = Key "palegoldenrod"
 907 |
 908 | export
 909 | palegreen : SVGColor
 910 | palegreen = Key "palegreen"
 911 |
 912 | export
 913 | paleturquoise : SVGColor
 914 | paleturquoise = Key "paleturquoise"
 915 |
 916 | export
 917 | palevioletred : SVGColor
 918 | palevioletred = Key "palevioletred"
 919 |
 920 | export
 921 | papayawhip : SVGColor
 922 | papayawhip = Key "papayawhip"
 923 |
 924 | export
 925 | peachpuff : SVGColor
 926 | peachpuff = Key "peachpuff"
 927 |
 928 | export
 929 | peru : SVGColor
 930 | peru = Key "peru"
 931 |
 932 | export
 933 | pink : SVGColor
 934 | pink = Key "pink"
 935 |
 936 | export
 937 | plum : SVGColor
 938 | plum = Key "plum"
 939 |
 940 | export
 941 | powderblue : SVGColor
 942 | powderblue = Key "powderblue"
 943 |
 944 | export
 945 | purple : SVGColor
 946 | purple = Key "purple"
 947 |
 948 | export
 949 | red : SVGColor
 950 | red = Key "red"
 951 |
 952 | export
 953 | rosybrown : SVGColor
 954 | rosybrown = Key "rosybrown"
 955 |
 956 | export
 957 | royalblue : SVGColor
 958 | royalblue = Key "royalblue"
 959 |
 960 | export
 961 | saddlebrown : SVGColor
 962 | saddlebrown = Key "saddlebrown"
 963 |
 964 | export
 965 | salmon : SVGColor
 966 | salmon = Key "salmon"
 967 |
 968 | export
 969 | sandybrown : SVGColor
 970 | sandybrown = Key "sandybrown"
 971 |
 972 | export
 973 | seagreen : SVGColor
 974 | seagreen = Key "seagreen"
 975 |
 976 | export
 977 | seashell : SVGColor
 978 | seashell = Key "seashell"
 979 |
 980 | export
 981 | sienna : SVGColor
 982 | sienna = Key "sienna"
 983 |
 984 | export
 985 | silver : SVGColor
 986 | silver = Key "silver"
 987 |
 988 | export
 989 | skyblue : SVGColor
 990 | skyblue = Key "skyblue"
 991 |
 992 | export
 993 | slateblue : SVGColor
 994 | slateblue = Key "slateblue"
 995 |
 996 | export
 997 | slategray : SVGColor
 998 | slategray = Key "slategray"
 999 |
1000 | export
1001 | slategrey : SVGColor
1002 | slategrey = Key "slategrey"
1003 |
1004 | export
1005 | snow : SVGColor
1006 | snow = Key "snow"
1007 |
1008 | export
1009 | springgreen : SVGColor
1010 | springgreen = Key "springgreen"
1011 |
1012 | export
1013 | steelblue : SVGColor
1014 | steelblue = Key "steelblue"
1015 |
1016 | export
1017 | tan : SVGColor
1018 | tan = Key "tan"
1019 |
1020 | export
1021 | teal : SVGColor
1022 | teal = Key "teal"
1023 |
1024 | export
1025 | thistle : SVGColor
1026 | thistle = Key "thistle"
1027 |
1028 | export
1029 | tomato : SVGColor
1030 | tomato = Key "tomato"
1031 |
1032 | export
1033 | transparent : SVGColor
1034 | transparent = Key "transparent"
1035 |
1036 | export
1037 | turquoise : SVGColor
1038 | turquoise = Key "turquoise"
1039 |
1040 | export
1041 | violet : SVGColor
1042 | violet = Key "violet"
1043 |
1044 | export
1045 | wheat : SVGColor
1046 | wheat = Key "wheat"
1047 |
1048 | export
1049 | white : SVGColor
1050 | white = Key "white"
1051 |
1052 | export
1053 | whitesmoke : SVGColor
1054 | whitesmoke = Key "whitesmoke"
1055 |
1056 | export
1057 | yellow : SVGColor
1058 | yellow = Key "yellow"
1059 |
1060 | export
1061 | yellowgreen : SVGColor
1062 | yellowgreen = Key "yellowgreen"
1063 |