Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    230
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Adjusting brightness of an image

    is there a way to increase or decrease the brightness of an image using css?
    i have tried to use filters like alpha then setting the opacity, but it doesnt work the way i want...so sometimes i have to make two version of image, one with a normal brightness and one with an increased brightness...then i will use it for some mouseover effect...

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,371
    Thanks
    32
    Thanked 286 Times in 280 Posts
    Short Answer: No. CSS can’t do that.

    Long Answer: The opacity property sets the opacity, not the brightness, obviously. You can probably do what you want by embedding the image inside of an SVG document, using a lighting filter, and then embedding the SVG document into your HTML document, but current browser support is shady.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    Regular Coder
    Join Date
    Nov 2005
    Posts
    230
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hm...ok, thanks!

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Hope this might be useful


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •