konsumi_xo's profile picture

Published by

published
updated

Category: SpaceHey

Using the selection pseudo-element

Just wanted to share a cool little trick I learned while studying web development that I don't see often on Spacehey.

what it does

Controls the color and background color of highlighted text. 

Highlight any part of my profile for a demo. (click and drag over text) 

where to paste & what to change

Paste the code provided below in the 'about me' or the 'who I'd like to meet' section in the profile editor. 

copy 2 different HEX or RGB values [ex. hex: #ffffff; rgb: rgb(0,0,0);] and paste in the spaces below. 

copy & customize this code

<style> 
::selection {
  color: (insert hex or rgb value here);
  background-color: (insert hex or rgb value here);
}
</style>

where to find hex or rgb values

My favorite places to create color pallets and copy and paste hex/rgb values are:



if you're a chrome user: 


note: this last one is especially useful if you want to use the same colors that are somewhere on your profile or copy a color from a different site/image somewhere else on the web. You'll be familiar with an eyedropper if you create digital art.

If you have any questions or comments, feel free to message me. I hope this helps you on your profile customization journey. :) 


3 Kudos

Comments

Displaying 0 of 0 comments ( View all | Add Comment )