Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8747891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:25:57+00:00 2026-06-13T12:25:57+00:00

Background: I am doing a major new functional version of my web application, and

  • 0

Background: I am doing a major new functional version of my web application, and I thought it would be nice to “celebrate” by updating the user interface as well. Since I don’t have the budget for a professional redesign, I thought I could make some subtle changes to the style.css sheet instead.

Ideally there would be a program which would import my style.css sheet (the colours are designed around Windows XP) and export a new style.css sheet in the style of Windows 7.
Although I have seen programs which allow you to import css sheets and play with each colour yourself and then export [something I have neither the time or the eye to do], I have not seen anything which changes the whole of your css sheet automatically while keeping some kind of correlation between your colours.

I wrote the following VBA code [I know it could be much improved, but I just threw it together to experiment] which will change all the colours of the style.css sheet (if it is pasted into column A of the active Excel sheet). Assuming that the CSS colors are represented in hexadecimal by eg #123456 (with the 12 being the Red component, the 34 being the Green component and the 56 representing the Blue component) The code as it stands makes the Red component of the colour greater, and the blue component less. [See the function makeWarmer]

Sub changeCSSColors()
    For j = 1 To 1390 'number of rows
        a = Cells(j, 1)
        b = InStr(a, "#")
        If b > 0 Then
            aHex = UCase(Mid(a, b + 1, 6))
            If isHexS(aHex) Then
                a = Left(a, b) + makeWarmer(aHex) + Mid(a, b + 7)
                Cells(j, 1) = a
            End If
        End If
    Next j

End Sub

Function isHex(aChar)
    If InStr("ABCDEFabcdef01234567890", aChar) > 0 Then isHex = True Else isHex = False
End Function

Function isHexS(aString)
    For j = 1 To Len(aString)
        b = Mid(aString, j, 1)
        If Not isHex(b) Then isHexS = False: Exit Function
    Next j
    isHexS = True
End Function

Function makeWarmer(aString)
    b = addOneToChar(Mid(aString, 1, 1))
    c = subOneToChar(Mid(aString, 5, 1))
    makeWarmer = addOneToChar(Mid(aString, 1, 1)) + Mid(aString, 2, 1) + addOneToChar(Mid(aString, 3, 1)) + Mid(aString, 4, 1) + addOneToChar(Mid(aString, 5, 1)) + Mid(aString, 6, 1)
End Function

Function swapBlueGreen(aString)
  swapBlueGreen = Mid(aString, 3, 2) + Mid(aString, 1, 2) + Mid(aString, 5, 2)
End Function

Function addOneToChar(aChar)
    If (aChar >= "0" And aChar <= "8") Or (aChar >= "A" And aChar <= "E") Then
        aChar = Chr(Asc(aChar) + 1)
    ElseIf aChar = "9" Then
        aChar = "A"
    ElseIf aChar = "F" Then
        aChar = "F"
    End If
    addOneToChar = aChar
End Function

Function subOneToChar(aChar)
    If (aChar >= "1" And aChar <= "9") Or (aChar >= "B" And aChar <= "F") Then
        aChar = Chr(Asc(aChar) - 1)
    ElseIf aChar = "A" Then
        aChar = "9"
    ElseIf aChar = "0" Then
        aChar = "0"
    End If
    subOneToChar = aChar
End Function

I also experimented by changing the Blue and Green components by using the function SwapBlueGreen. However I did not get satisfactory visual results with either function. [The web application just looked weird]

Has anyone got any other ideas of functions instead of makeWarmer or SwapBlueGreen that I could use, perhaps some kind of masking. Alternatively maybe there is some software that does what I want.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:25:58+00:00Added an answer on June 13, 2026 at 12:25 pm

    You could convert the old document to SASS and use the powerful SASS color functions to do your manipulation.

    This might be easier than writing a program yourself 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background I am doing some experimentation with Node.js and would like to read a
I want to minimize the application, leaving it in background doing exactly the same
I have a WinForms application in which my background worker is doing a sync
In my application I am doing background process of database storing. How can I
I'm doing background subtraction using opencv. The problem is the foreground object is not
BACKGROUND I'm doing an interactive art project for school. PROCESS For this project the
In an android service I have created thread(s) for doing some background task. I
The background to this problem is that I'm doing a computing project which involves
For a bit of background to know what i am doing: using hit highlighter
I come from PHP background and am used to doing var_dump , echo and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.