Skip to content

Instantly share code, notes, and snippets.

View doomlaser's full-sized avatar
💭
working on AI Dream Factory. Soon.

Mark Johns doomlaser

💭
working on AI Dream Factory. Soon.
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)