URGENT convert javascript code to php code NOW within 30 minutes
$10-30 AUD
In Bearbeitung
Veröffentlicht vor fast 10 Jahren
$10-30 AUD
Bezahlt bei Lieferung
I have a simple 222 line javascript script made of various functions.. I need the same functionality written in php functions..here is code sample.. only allows me set number of characters here..FILE IS ATTACHED
###### START ######
var colorflow = (function () {
"use strict";
var hex2rgb = function (hex) {
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
result, r, g, b;
hex = [login to view URL](shorthandRegex, function (r, g, b) {
return r + r + g + g + b + b;
});
result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/[login to view URL](hex);
r = parseInt(result[1], 16);
g = parseInt(result[2], 16);
b = parseInt(result[3], 16);
return [r, g, b];
},
rgb2hex = function (rgb) {
var hex = '',
h, i, c;
for (i = 0; i < [login to view URL]; i += 1) {
c = rgb[i];
h = [login to view URL](16);
h = ([login to view URL] === 1) ? "0" + h : h;
hex += h;
}
return '#' + hex;
},
rgb2hsv = function (rgb) {
var
r = rgb[0],
g = rgb[1],
b = rgb[2],
min = [login to view URL](r, g, b),
max = [login to view URL](r, g, b),
delta = max - min,
h, s, v = max;
v = [login to view URL](max / 255 * 100);
if (max !== 0) {
s = [login to view URL](delta / max * 100);
} else {
return [0, 0, 0];
}
if (r === max) {
h = (g - b) / delta;
} else if (g === max) {
h = 2 + (b - r) / delta;
} else {
h = 4 + (r - g) / delta;
}
h = [login to view URL](h * 60);
if (h < 0) {
h += 360;
}
return [h, s, v];
},
hsv2rgb = function (hsv) {
var
r, g, b, i, f, p, q, t, h = hsv[0],
s = hsv[1],
v = hsv[2];
h = [login to view URL](0, [login to view URL](360, h));
s = [login to view URL](0, [login to view URL](100, s));
v = [login to view URL](0, [login to view URL](100, v));
s /= 100;
v /= 100;
if (s === 0) {
r = g = b = v;
return [[login to view URL](r * 255), [login to view URL](g * 255), [login to view URL](b * 255)];
}
h /= 60;
i = [login to view URL](h);
f = h - i;
p = v * (1 - s);
q = v * (1 - s * f);
t = v * (1 - s * (1 - f));
switch (i) {
I have checked your source code.
I have rich experience in js and php.
So i can easily understand your source code.
Now i am making same functionality.
If you want to see my portfolio, please see my portfolio.
But i will not talk about me.
Please open chart.
the faster to start this job, the better to implement function asap.
thanks
I have good experince in PHP and Javascript programming.I can convert these function into PHP function which you can use as you per your need,I am new at freelancer so i just want to assure you to trust on me i can do this with quality and in time.
Hello,
I can do the job for you in around one day.
I will do everything by hand, not automatic tools, so you can be assured you will get quality code.
Thank you