Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add("RenderScreenspaceEffects", "clr", function()
- local samples = 64
- local size = 256
- local w = ScrW() / 2
- local h = ScrH() / 2
- local clr = Vector(0)
- render.CapturePixels()
- for i=1, samples do
- clr = clr + Vector(render.ReadPixel(w + math.random(-size, size), h + math.random(-size, size)))
- end
- clr = (clr / 32)
- current_color = Color(clr.r, clr.g, clr.b)
- end)
- local hue =
- {
- "red",
- "orange",
- "yellow",
- "green",
- "turquoise",
- "blue",
- "purple",
- "magenta",
- }
- local sat =
- {
- "pale",
- "",
- "strong",
- }
- local val =
- {
- "dark",
- "",
- "bright"
- }
- function HSVToNames(h,s,v)
- return
- hue[math.Round((1+(h/360)*#hue))] or hue[1],
- sat[math.ceil(s*#sat)] or sat[1],
- val[math.ceil(v*#val)] or val[1]
- end
Advertisement
Add Comment
Please, Sign In to add comment