2

This must have been asked somewhere, but can't find where :(

I was reading up on finding out which browser someone was using in html.

My site uses a 'theme' (DevExpress' Black glass) and was wondering if there was a way of accessing Chrome's current theme, when the user is logged in.

I understand this has the potential to be a huge undertaking, but if it was possible, is there a way of getting the 'css' of chromes theme (obviously this would only apply if user was using chrome)?

I am currently writing a project in mvc, but any html/css approaches would be beneficial here.

For Example:

Grass

Is it possible to obtain access to the css of the 'Grass' theme (please note, this is just one example, there are many other themes available)?

Pacerier
  • 86,231
  • 106
  • 366
  • 634
  • What do you mean by google-chrome theme, do you mean the default stylesheet or? – Maverick Oct 08 '14 at 15:13
  • If you login to chrome, you are able to change your theme (in settings). I was thinking of trying to obtain that info on the current theme, not default. –  Oct 08 '14 at 15:18
  • Did someone really go through a load of my old questions downvoting them? Children, really. –  Oct 08 '14 at 15:43
  • People really don't have what to do! Hope the answer down helps! – Maverick Oct 08 '14 at 16:12

1 Answers1

1

As far as I know it's not possible, because it doesn't work like CSS. You have to get the JSON file, because I don't think it's possible from CRX.

Here is how a JSON file for a GC theme looks like:

{
  "version": "1.0",
  "name": "test theme",
  "description": "A test theme",
  "theme": {
    "images" : {
      "theme_frame" : "images/theme_frame_camo.png",
      "theme_toolbar" : "images/theme_toolbar_camo.png",
      "theme_ntp_background" : "images/theme_ntp_background_norepeat.png",
      "theme_ntp_attribution" : "images/attribution.png"
    },
    "colors" : {
      "frame" : [71, 105, 91],
      "toolbar" : [207, 221, 192],
      "ntp_text" : [20, 40, 0],
      "ntp_link" : [36, 70, 0],
      "ntp_section" : [207, 221, 192],
      "button_background" : [255, 255, 255]
    },
    "tints" : {
      "buttons" : [0.33, 0.5, 0.47]
    },
    "properties" : {
      "ntp_background_alignment" : "bottom"
    }
  }
}

More info: https://code.google.com/p/chromium/wiki/ThemeCreationGuide

BTW: Why would you want this, when there are 3-4 colors, no styles? You can get the colors with color picker.

Maverick
  • 876
  • 2
  • 12
  • 22