Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 19, 2022, 04:57:55 AM

Login with username, password and session length
Members
  • Total Members: 3843
  • Latest: Tricky
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 51
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 1
Guests: 36
Total: 37

Author Topic: Color Picker HEX, RGB  (Read 11878 times)

0 Members and 1 Guest are viewing this topic.

Offline Crip

  • Jesus Inside.
  • Themes
  • *
  • Posts: 4168
  • Theme Support
    • Cripzone
Color Picker HEX, RGB
« on: October 10, 2006, 03:44:32 PM »
COLOR PICKER FOR YOU!!
You'll want this on your Portal, very handy tool indeed!

Demo

Unzip, upload all files, folders in order to your Forum Root!
Create a New Article: -
add in an IFrame -
Code: [Select]
<iframe src="demo.htm" width="!00%" height="850" border="0"></iframe>

You'll never go looking for a color chart again...

<h3>Customization</h3>
<p align="justify">While this script references multiple .js files, to integrate the color picker with your form in the fashion above, you do not need to be bothered with modifying any of these files. Instead, there are only two changes you need to make to the code of "demo.htm" to integrate the color picker into your page:</p>

1) Locate the code:

<p align="justify">ddcolorposter.fillcolorbox("colorfield1", "colorbox1") //PREFILL "colorbox1" with hex value from "colorfield1"</p>
<p align="justify">ddcolorposter.fillcolorbox("colorfield2", "colorbox2") //PREFILL "colorbox1" with hex value from "colorfield1"</p>



<p align="justify">These two lines are used to prefill the color boxes to the right of the form fields in question with the color currently inside the field when the page first loads. Without this code, when your page loads, the color boxes will not be initially filled with the color values inside the form fields.</p>

<p align="justify">There are two fields in the demo, hence two lines. The first parameter of fillcolorbox(), "colorfield1", should be the ID of the form field, while the second parameter, the ID of the matching color box.</p>

<p>See below for more information.</p>

2) Locate the code:

<form>
# <input type="text" id="colorfield1" onFocus="ddcolorposter.echocolor(this, 'colorbox1')"> <span id="colorbox1" class="colorbox">____</span>

# <input type="text" id="colorfield2" onFocus="ddcolorposter.echocolor(this, 'colorbox2')"> <span id="colorbox2" class="colorbox">____</span>
</form>



<p align="justify">This code demonstrates how to integrate the color picker with any form field on your page.</p>
<p align="justify">The key is the add the code:</p>
<p align="justify">onFocus="ddcolorposter.echocolor(this, 'colorbox1')" inside the desired form fields, where "colorbox1" is the ID of color box.</p>

<h2>That's it!</h2>


I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes


Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: Color Picker HEX, RGB
« Reply #1 on: October 10, 2006, 04:13:16 PM »
Nice Crip, thank you :)
What have happend to your theme header ? all squashed to gether  ???

Offline Crip

  • Jesus Inside.
  • Themes
  • *
  • Posts: 4168
  • Theme Support
    • Cripzone
Re: Color Picker HEX, RGB
« Reply #2 on: October 10, 2006, 04:15:27 PM »
it upshrinked is all..?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes


Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: Color Picker HEX, RGB
« Reply #3 on: October 10, 2006, 04:20:09 PM »
The shrink doesent work for me on the article page, it stays down  ???

Offline RoarinRow

  • Hero Member
  • *****
  • Posts: 1034
  • Ride my AV!
    • Avalanche Style
Re: Color Picker HEX, RGB
« Reply #4 on: October 10, 2006, 04:36:48 PM »
For some reason, it doesn't go to the width of the page even though the code says 100%.

Oh I see the problem, your 100% is !00%   :o

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Offline Crip

  • Jesus Inside.
  • Themes
  • *
  • Posts: 4168
  • Theme Support
    • Cripzone
Re: Color Picker HEX, RGB
« Reply #5 on: October 11, 2006, 12:58:02 PM »
If you view it on the Forum it's a tad bit wider.. Forum width is set on 82% ! @ RR 
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes


rbh

  • Guest
Re: Color Picker HEX, RGB
« Reply #6 on: October 11, 2006, 10:04:27 PM »
thanks for the useful script......and the new smiley. ;)

Offline RoarinRow

  • Hero Member
  • *****
  • Posts: 1034
  • Ride my AV!
    • Avalanche Style
Re: Color Picker HEX, RGB
« Reply #7 on: October 11, 2006, 10:22:13 PM »
If you view it on the Forum it's a tad bit wider.. Forum width is set on 82% ! @ RR 

I left mine at 100% and disabled the left and right blocks when viewing the article.   :up:

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Offline Crip

  • Jesus Inside.
  • Themes
  • *
  • Posts: 4168
  • Theme Support
    • Cripzone
Re: Color Picker HEX, RGB
« Reply #8 on: October 12, 2006, 06:39:43 AM »
I just noticed something with this script, you can click and drag the color box anywhere within the Article.. :)
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes


copter

  • Guest
Re: Color Picker HEX, RGB
« Reply #9 on: October 30, 2006, 09:43:54 AM »
Hi

thats a great piece of work is that