KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
I am using this image
http://www.roblox.com/asset?id=141066192
Ok so. How do I get it ready?
I have a cursor that is draggable.
I want it based on scale.
So, can you post some code here to help? Sorry, theres no scripting helpers anymore so this may be the wrong place. |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
aaa |
|
|
Bricks can't be color3 unless they're mesh. |
|
|
Wrong, bricks can be colored using color3. Color is a color3 property of brick that doesn't show in studio properties.
brick.Color = Color3.new(math.random(),math.random(),math.random()) |
|
|
nether that does not exactly use color3 it just rounds it to the nearest brick color |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
no.^
And I want a gui, not a brickcolor |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
Please! F3x does it perfectly when you color fire and smoke.
cntkillme, any help?
|
|
ZawieJoin Date: 2010-07-04 Post Count: 6338 |
use the color wheel instead
so you can do the 3 thing |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
Can you give me a link to a free one?
f3x does that with a square btw. |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
a |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
aaaaaa |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
aaa |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
I have made a RGB to RYB.
Wil I need it? |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
HALPPPPPPP |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
aaaa |
|
AltableJoin Date: 2015-07-24 Post Count: 23 |
You need a function to convert hsv to rgb.
local image -- image instance
local point -- point in the picture
local hue = (point.x / image.AbsoluteSize.X) * 360
local saturation = (point.y / image.AbsoluteSize.Y)
local value = 1
local rgb = HSVToRGB(hue, saturation, value)
I don't guarantee that this code is fully accurate |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
how do i make tha? |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
function HSVToRGB( hue, saturation, value )
-- Returns the RGB equivalent of the given HSV-defined color
-- (adapted from some code found around the web)
-- If it's achromatic, just return the value
if saturation == 0 then
return value;
end;
-- Get the hue sector
local hue_sector = math.floor( hue / 60 );
local hue_sector_offset = ( hue / 60 ) - hue_sector;
local p = value * ( 1 - saturation );
local q = value * ( 1 - saturation * hue_sector_offset );
local t = value * ( 1 - saturation * ( 1 - hue_sector_offset ) );
if hue_sector == 0 then
return value, t, p;
elseif hue_sector == 1 then
return q, value, p;
elseif hue_sector == 2 then
return p, value, t;
elseif hue_sector == 3 then
return p, q, value;
elseif hue_sector == 4 then
return t, p, value;
elseif hue_sector == 5 then
return value, p, q;
end;
end;
local image = script.Parent.ColorSquare -- image instance
local point = colorCursor -- point in the picture
while wait() do
local hue = (point.AbsolutePosition.X / image.AbsoluteSize.X) * 360
local saturation = (point.AbsolutePosition.Y / image.AbsoluteSize.Y)
local value = 1
local rgb = HSVToRGB(hue, saturation, value)
script.Parent.PrimaryColor.BackgroundColor3 = Color3.new(rgb);
end
Dont work, BUT it worked once but wouldnt update |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
I snactched it from f3x hehehe |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
aaaaaa |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
print(Color3.new(rgb))
>0,0,0
print(rgb)
>nil
wut? |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
:( |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
guys :( |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
i will tell u a joke :D |
|
AltableJoin Date: 2015-07-24 Post Count: 23 |
For what I've seen of your code, gui object point isn't being moved. Either move it to the position of the mouse, or use the mouse coordinates instead.
local mouse = player:GetMouse()
while wait() do
local mousePosition = Vector2.new(mouse.X, mouse.Y) - image.AbsolutePosition -- mouse position relative to image
local hue = (mousePosition.X / image.AbsoluteSize.X) * 360
local saturation = (mousePosition.Y / image.AbsoluteSize.Y)
local value = 1
local rgb = HSVToRGB(hue, saturation, value)
script.Parent.PrimaryColor.BackgroundColor3 = Color3.new(rgb);
end |
|