Skip to content

Instantly share code, notes, and snippets.

View doomlaser's full-sized avatar
💭
a flock of birds escape a secret underground government lab...

Mark Johns doomlaser

💭
a flock of birds escape a secret underground government lab...
View GitHub Profile
@doomlaser
doomlaser / Colors.cs
Created March 29, 2018 13:43
Unity C# Methods to convert between RGB and HSV colors
using UnityEngine;
using System.Collections;
public static class Colors
{
public static Color ColorFromHSV(float h, float s, float v, float a = 1)
{
// no saturation, we can return the value across the board (grayscale)
if (s == 0)