setColorDS :: Color -> DrawState -> DrawState
setColorDS col = mapDSColor $ \mcol ->
  case (col, mcol) of
    (_, Nothing) -> Just col
    (RGBA _ _ _ 0, Just _) -> Just col
    (RGBA _ _ _ a1, Just (RGBA r0 g0 b0 a0)) -> Just (RGBA r0 g0 b0 (a0 * a1))
setColorDS :: Color -> DrawState -> DrawState
setColorDS col = mapDSColor $ \mcol ->
  case (col, mcol) of
    (_, Nothing) -> Just col
    (RGBA _ _ _ 0, Just _) -> Just col
    (RGBA _ _ _ a1, Just (RGBA r0 g0 b0 a0)) -> Just (RGBA r0 g0 b0 (a0 * a1))
setColorDS col = mapDSColor $ \mcol ->
  case (col, mcol) of
    (_, Nothing) -> Just col
    (RGBA _ _ _ 0, Just _) -> Just col
    (RGBA _ _ _ a1, Just (RGBA r0 g0 b0 a0)) -> Just (RGBA r0 g0 b0 (a0 * a1))