private void ApplyColorAndBrushToObject(Color color, Guid brushGuid) { m_TargetStroke.m_Color = ColorPickerUtils.ClampLuminance( color, BrushCatalog.m_Instance.GetBrush(brushGuid).m_ColorLuminanceMin); m_TargetStroke.m_BrushGuid = brushGuid; m_TargetStroke.InvalidateCopy(); m_TargetStroke.Uncreate(); m_TargetStroke.Recreate(); }
public Color GenerateJitteredColor(float colorLuminanceMin) { Color.RGBToHSV(m_lastChosenColor, out var h, out var s, out var v); return(ColorPickerUtils.ClampLuminance( Random.ColorHSV( h - colorJitter.x, h + colorJitter.x, s - colorJitter.y, s + colorJitter.y, v - colorJitter.z, v + colorJitter.z ), colorLuminanceMin )); }