Year of the Dragon: Through June 26th, claim free Ground Bound Green Dragon Mount! Speak to Xatheral in the Hall of Heroes.
(April's reward of a free expansion or Greater Elixir of Discovery can still be claimed from Trilliya until June 4th.) edit
Game mechanics • Newbie guide • In development • DDO Store • Social Media
Challenges • Classes • Collectables • Crafting • Enhancements • Epic Destinies • Favor • Feats
Glossary • Items • Maps • Monsters • Places • Quests • Races • Reincarnation • Skills • Spells
Please create an account or log in to remove ads, build a reputation, and unlock more editing privileges and then visit DDO wiki's IRC Chat/Discord if you need any help!
MediaWiki:Gadget-codeColours.js
Note: After saving, you may have to bypass your browser's cache to see the changes, you can click here or try one of the methods below..
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl+F5 or Ctrl+r (⌘ Command+r on a Mac)
- Google Chrome: Press Ctrl+⇧ Shift+R (⌘ Command+⇧ Shift+R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl+F5
- Konqueror: Click Reload or press F5
- Opera: Clear the cache in Tools ‣ Preferences
//<nowiki>
const hexKey = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' ];
const hexColour = new RegExp( '#([0-9A-F]{1,2}){3}', 'i' );
$( 'span.mh' ).each( function() {
var thisColour = $( this ).text();
if ( hexColour.test( thisColour ) ) {
var thisRGB = thisColour.match( /#([0-9A-F]{1,2})([0-9A-F]{1,2})([0-9A-F]{1,2})/ );
var r = ( hexKey.indexOf( thisRGB[ 1 ][ 0 ] ) * 16 ) + hexKey.indexOf( thisRGB[ 1 ][ 1 ] );
var g = ( hexKey.indexOf( thisRGB[ 2 ][ 0 ] ) * 16 ) + hexKey.indexOf( thisRGB[ 2 ][ 1 ] );
var b = ( hexKey.indexOf( thisRGB[ 3 ][ 0 ] ) * 16 ) + hexKey.indexOf( thisRGB[ 3 ][ 1 ] );
var thisFont = ( Math.sqrt( ( 0.299 * r * r ) + ( 0.587 * g * g ) + ( 0.114 * b * b ) ) > 127.5 ? '#000' : '#FFF' );
$( this ).css( { 'background-color': thisColour, 'color': thisFont, 'padding': '1px 4px' } );
}
} );
//</nowiki>[[Category:Gadgets]]