Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Rendering application in inverse (negative) colors

Rendering application in inverse (negative) colors

Scheduled Pinned Locked Moved C#
csharpwinformsdesignsalesquestion
18 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    While this solution definitely isn't foolproof, you can still change the control colors at runtime by using code like this:

    this.BackColor = Color.DarkGray;
    this.ForeColor = Color.White;
    foreach (Control c in this.Controls)
    {
    c.BackColor = Color.DarkGray;
    c.ForeColor = Color.White;
    }

    regards

    B Offline
    B Offline
    Bekjong
    wrote on last edited by
    #9

    Yep, I realize that, but as I said, that will be loads and loads of work for this app.

    Standards are great! Everybody should have one!

    realJSOPR 1 Reply Last reply
    0
    • S Simon P Stevens

      Bekjong wrote:

      I just wanted to set high contrast colors for a single app

      Oh, in that case, I don't think there is a easy setting you can change.

      Bekjong wrote:

      I'm not using the default system color panel, so this won't work with my application.

      Double ohh, Now there defiantly isn't a setting for it. It is winforms or wpf?

      Simon

      B Offline
      B Offline
      Bekjong
      wrote on last edited by
      #10

      It's Forms. Thanks again.

      Standards are great! Everybody should have one!

      S 1 Reply Last reply
      0
      • J Jaime Olivares

        You just need to change the lower palette colors, that are related to the system colors (windows background, caption, border colors, etc)

        Best regards, Jaime.

        B Offline
        B Offline
        Bekjong
        wrote on last edited by
        #11

        I did find these, but I don't see how this helps the overall contrast of my app, since (aside from window captions and border colors) these colors aren't used in my application. Besides, changing these colors means changing the windows overall color scheme, which is not something I want to do to my customers. Thanks again.

        Standards are great! Everybody should have one!

        1 Reply Last reply
        0
        • B Bekjong

          Tried this, but this only influences the system color pallet, which means it won't work for my app (which uses a custom pallet). Thanks anyway.

          Standards are great! Everybody should have one!

          J Offline
          J Offline
          Jaime Olivares
          wrote on last edited by
          #12

          So, you have a custom palette? Then, what is the problem? You have to define another palette into your application, and let the user switch between them.

          Best regards, Jaime.

          B 1 Reply Last reply
          0
          • B Bekjong

            It's Forms. Thanks again.

            Standards are great! Everybody should have one!

            S Offline
            S Offline
            Simon P Stevens
            wrote on last edited by
            #13

            You could look into the possibility of writing a custom control, that took the colour beneath each point in the surface, and inverted it. Effectively acting like a inversion filter, so you'd just display the control over the top of each of the apps form. Not sure how easy/hard this would be, or even if possible.

            Simon

            B 1 Reply Last reply
            0
            • J Jaime Olivares

              So, you have a custom palette? Then, what is the problem? You have to define another palette into your application, and let the user switch between them.

              Best regards, Jaime.

              B Offline
              B Offline
              Bekjong
              wrote on last edited by
              #14

              Unfortunately, the good people who designed this application in all their wisdom thought it would be better to just set the colors from the designer. So no, I just have a bunch rgb values in doc file defining what colors should be used where.

              Standards are great! Everybody should have one!

              1 Reply Last reply
              0
              • S Simon P Stevens

                You could look into the possibility of writing a custom control, that took the colour beneath each point in the surface, and inverted it. Effectively acting like a inversion filter, so you'd just display the control over the top of each of the apps form. Not sure how easy/hard this would be, or even if possible.

                Simon

                B Offline
                B Offline
                Bekjong
                wrote on last edited by
                #15

                I don't think it will work by putting new controls over old ones, but you did bring me to an idea: I could use reflection to find all controls in my app, then find each field of type Color and invert it. That might do the trick. Think it will work? Thanks for the inspiration.

                Standards are great! Everybody should have one!

                S 1 Reply Last reply
                0
                • B Bekjong

                  I don't think it will work by putting new controls over old ones, but you did bring me to an idea: I could use reflection to find all controls in my app, then find each field of type Color and invert it. That might do the trick. Think it will work? Thanks for the inspiration.

                  Standards are great! Everybody should have one!

                  S Offline
                  S Offline
                  Simon P Stevens
                  wrote on last edited by
                  #16

                  Yeah, that sounds like a pretty good idea. Nice one.

                  Simon

                  1 Reply Last reply
                  0
                  • B Bekjong

                    Yep, I realize that, but as I said, that will be loads and loads of work for this app.

                    Standards are great! Everybody should have one!

                    realJSOPR Offline
                    realJSOPR Offline
                    realJSOP
                    wrote on last edited by
                    #17

                    Bekjong wrote:

                    Yep, I realize that, but as I said, that will be loads and loads of work for this app.

                    1. You're paid to work, though, right? 1) You must have had an idea that this requirement would come up. It's ultimately you're fault there's "so much work" involved in the change.

                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                    B 1 Reply Last reply
                    0
                    • realJSOPR realJSOP

                      Bekjong wrote:

                      Yep, I realize that, but as I said, that will be loads and loads of work for this app.

                      1. You're paid to work, though, right? 1) You must have had an idea that this requirement would come up. It's ultimately you're fault there's "so much work" involved in the change.

                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                      -----
                      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                      B Offline
                      B Offline
                      Bekjong
                      wrote on last edited by
                      #18
                      1. Yes. Fortunately, there is more work to do. If this is something I can fix for this specific customer quickly I'll do it. If not, that's just a shame for this customer, who already bought product knowing this isn't a feature. Trying to fix it for the guy is just a matter of service. My employers won't make any money on it, they will if I work on something else. 1) No and no. You're assuming I wrote all this software myself and you're assuming this would be a reasonable software requirement for this product, which could hardly be less false. Please stop assuming.

                      Standards are great! Everybody should have one!

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups