is there any option to set color of background or text in list messaging template. I have this element in payload:
{
"title":"priority #2: and this is clickable title",
"subtitle":"And here’s some text, makes no sense, but I need it here",
"default_action": {
"type": "web_url",
"url": "http://google.com",
"messenger_extensions": false,
"webview_height_ratio": "tall"
}
}
but unfortunely I wasn't able to find in docs the info how to set these colors. Maybe somebody have already done this, and could tell me what I have to add.
Nope, background and text color is not supported.
Related
I'm using Mirador viewer with annotation file that include 'xywh' values to set rectangels on the image.
I want to use Svg instea, so i can draw polygons on the image.
I found here: IIIF Api the annotation item struct to include svg, but it's not working for me.
Can anybody help please?
Thanks
Can you provide an example of the SvgAnnotation that you are trying to use?
Mirador 3 should support this style of SvgAnnotation:
"motivation": "commenting",
"target": {
"id": "https://iiif.bodleian.ox.ac.uk/iiif/canvas/9cca8fdd-4a61-4429-8ac1-f648764b4d6d.json",
"selector": {
"type": "SvgSelector",
"value": "<path xmlns=\"http://www.w3.org/2000/svg\" d=\"M3548.40946,1221.66399c0,-84.79382 68.73897,-153.53279 153.53279,-153.53279c84.79382,0 153.53279,68.73897 153.53279,153.53279c0,84.79382 -68.73897,153.53279 -153.53279,153.53279c-84.79382,0 -153.53279,-68.73897 -153.53279,-153.53279z\" fill=\"none\" fill-rule=\"nonzero\" stroke=\"#00bfff\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke-miterlimit=\"10\" stroke-dasharray=\"\" stroke-dashoffset=\"0\" font-family=\"none\" font-weight=\"none\" font-size=\"none\" text-anchor=\"none\" style=\"mix-blend-mode: normal\"/>"
}
},
"type": "Annotation"
},
https://github.com/ProjectMirador/mirador/blob/5ca33205bf9bac636ba5ef0faf820f58c0d9751d/__tests__/fixtures/version-3/001.json#L301-L310
I'm fully able to move my TreeView from the SideBar to the bottom panel (Problems, output, terminal...).
However, I'm uncertain how I would go about making my TreeView appear in the bottom panel by default. The documentation doesn't state anything about the bottom panel.
Any ideas?
I see the panel as an option for the viewContainer as in:
"contributes": {
"viewsContainers": {
"panel" : [ // instead of activityBar here
{
"id": "your virewContainer id",
"title": "your title",
"icon": "$(....)"
}
]
}
}
Found by using intellisense.
I am currently using Vs Code. But I don't know much about the IDE. I want to set a background image to IDE. Is it possible?
I've been searching for weeks.
I installed an extension named background from shalldie. I have changed the json code with this:
{
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs":"active",
"background.enabled": true,
"background.loop": false,
"background.useDefault": false,
"background.useFront": false,
"background.style": {
"content": "''",
"pointer-events": "none",
"position": "absolute",
"z-index": "99999",
"width": "70%",
"height": "100%",
"margin-left":"30%",
"background-position": "right",
"background-size": "cover",
"background-repeat": "no-repeat",
"opacity": 0.1
},
"background.customImages": [
"file//C:/madara.jpg",
]
}
after this, vs code wanted me to reload the IDE and I did. but nothing have changed.
After all this, I got another notification that says "Bracket Pair Colorizer is no longer being maintained.". But I don't know what does it mean.
I am using windows 10.
what do I need to do now?
file:///C:/madara.jpg
your path should add a '/' before drive letter
I'm trying to make the Google Smart Home API work on Gladys Assistant (it's an open-source home automation software), and I struggle to make Google Integrations tests pass.
This is my onSync:
onSync
{
"requestId": "9164924531720238290",
"payload": {
"agentUserId": "9aba8230-9e8d-47b7-9d1c-f4dd8725aad3",
"devices": [
{
"id": "mqtt-lamp-temperature",
"type": "action.devices.types.LIGHT",
"traits": [
"action.devices.traits.ColorSetting",
"action.devices.traits.Brightness",
"action.devices.traits.OnOff"
],
"name": {
"name": "Lampe Temperature"
},
"attributes": {
"colorModel": "rgb",
"colorTemperatureRange": {
"temperatureMinK": 2000,
"temperatureMaxK": 9000
}
},
"deviceInfo": {
"model": null
},
"roomHint": "Grand Salon",
"willReportState": true
}
]
}
}
This is what I'm sending to reportState:
reportState
{
online: true,
color: { temperatureK: 3000, spectrumRgb: 8388863 },
on: true
}
This is what the onQuery is returning to the Google API:
onQuery
{
'mqtt-lamp-temperature': {
online: true,
color: { temperatureK: 3000, spectrumRgb: 8388863 },
on: true
}
}
But this is what Google sees in the integrations tests:
AssertionError: Expected state to include:
{"color":{"temperatureK":{"xRange":[2600,3200]}}},
actual state: {"color":{"spectrumRGB":8388863},"on":true,"online":true}: expected false to be true
It seems Google completely ignores the temperatureK attribute when the spectrumRgb attribute is here.
To confirm my theory, I tried to create a lamp that has only spectrumRgb and a light that has only temperatureK, and then it works perfectly. The problem is, in that case, some tests are skipped and I think I won't get validated by Google with that.
My question is:
Why does those attributes do not work together? Can't a light be controlled by its temperature and by it's RGB ?
Do you see anything weird in my implementation?
Thanks a lot for your help!
From the docs:
Color temperature is a linear scale and a subset of the RGB/HSV full spectrum color models.
You're currently trying to send two different color settings to your light (orange-ish in kelvin, deep pink in rgb), which is part of the issue you're running into.
You have set your device up in your SYNC to support both RGB and temperature, but in your QUERY/EXECUTE intents, you need to send either temperatureK or rgb spectrum values, not both.
Hi Your JSON format of Query and ReportState is different, include the device id in the ReportState as well, read the google report state docs for more info.
I went through https://code.visualstudio.com/docs/getstarted/theme-color-reference but can't seem to find the setting for changing the comment color.
I am currently using Atom One Dark Theme and just like to lighten the color a little bit so I can read it better.
From 1.15 (July 2017) you can change it from settings.json Ctrl+,
"editor.tokenColorCustomizations": {
"comments": "#d4922f"
},
From 1.20 (January 2018) you can also do it for each theme separately:
"editor.tokenColorCustomizations": {
"[Atom One Dark]": {
"comments": "#d4922f"
}
},
Or now you can specify settings for multiple themes at once as "[Atom One Dark][Tomorrow Night Blue]": {...}
Finding the right scope:
Developer: Inspect TM Scopes editor.action.inspectTMScopes
Selector priority:
https://code.visualstudio.com/blogs/2017/02/08/syntax-highlighting-optimizations#_textmate-themes
Ok, more examples (for js):
"editor.tokenColorCustomizations": {
"textMateRules": [{
"scope": "INSERT_SCOPE_HERE",
"settings": {
"foreground": "#ff0000"
}
}]
}
comment
punctuation.definition.comment
comment.block.documentation
storage.type.class.jsdoc
entity.name.type.instance.jsdoc
variable.other.jsdoc
1.Go to your settings.
2.Type “editor.tokenColorCustomizations” into the search bar then click on “Edit in settings.json”:
3.By default, “editor.tokenColorCustomizations” is set to “null”. To customize the comment color, you can add:
{ "comments": "[color code]" }
You can type something like this:
> "editor.tokenColorCustomizations": {
> "comments": "#e45e91" },
4.Change the color of comments,based on your liking by hovering over the color and choosing your desired color.
5.Then save the changes.(Ctrl+S)
6.Exit the program. open it again, you will see the changes.
To expand on the answer and #Johnny Derp's comment. You can change the font color and style using:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment",
"settings": {
"fontStyle": "italic",
"foreground": "#C69650",
}
}
]
},
background cannot be changed in this way, only the color and style. As of June, 2018.
Also in answer to a couple of comments about changing comments puntuation (like the //) colors - which now have to be separately colored with their own textmate rule, a change may be coming to fix that in the October 2019 release - at this point it is an unresolved issue but added to the October 2019 milestone. See https://github.com/microsoft/vscode/milestone/102
In VS Code: 1.56.2
Add to settings.json:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
"comment.block.documentation",
"comment.block.documentation.js",
"comment.line.double-slash.js",
"storage.type.class.jsdoc",
"entity.name.type.instance.jsdoc",
"variable.other.jsdoc",
"punctuation.definition.comment",
"punctuation.definition.comment.begin.documentation",
"punctuation.definition.comment.end.documentation"
],
"settings": {
"fontStyle": "italic",
"foreground": "#287a1d"
}
}
]
}
If there is still stoff missing: CTRL+SHIFT+P => Developer: Inspect Editor Tokens and Scopes hover over the parts that are not colored correctly and add them to "scope".
There you are. :)
Looks like the token colors cannot be customized within the settings at the moment:
The most prominent editor colors are the token colors that are based
on the language grammar installed. These colors are defined by the
Color Theme and can (currently) not be customized in the settings.
Source: https://code.visualstudio.com/docs/getstarted/theme-color-reference
I did notice that if you go into the theme folders, for example:
C:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\theme-monokai
and edit the monokai-color-theme.json file, look for the line with "name": "Comment" and change the "foreground" color it will work. Just make sure to restart the program.
Like Mark said, but add in the "scope": after "comment"
"punctuation.definition.comment"
to color also the punctuation,
e.g. (// in javescript | /* */ in css | <!-- --> in html).
"scope": ["comment", "punctuation.definition.comment"]
While commenting on comment subject, I found "Better Comments" extension of VS Code very useful. You can give various colors to your comments and hence categorize your comments based on importance etc.
Default comments color can also be changed.
https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments
Example:
This extension can be configured in User Settings or Workspace settings.
Doc, Block, and Line settings
To have differnet colors for Doc, Block, and Line comments:
I.e. for the Cobalt2 theme:
"editor.tokenColorCustomizations": {
"[Cobalt2]": {
"textMateRules": [
{
"scope": [
"comment.block",
"punctuation.definition.comment.end",
"punctuation.definition.comment.begin"
],
"settings": {
"foreground": "#85b3f8",
"fontStyle": "bold"
}
},
{
"scope": [
"comment.block.documentation",
"punctuation.definition.comment.begin.documentation",
"punctuation.definition.comment.end.documentation"
],
"settings": {
"foreground": "#6bddb7",
"fontStyle": "bold"
}
},{
"scope":["comment.line", "punctuation.definition.comment"],
"settings": {
"foreground": "#FF0000",
"fontStyle": "bold"
}
}
]
}
}
Tested with C++.
You can modify your VS code by simply edit your setting file in VS code and follow these 3 steps.
step1:
step2:
Step3:
To change VS Code comment color
File --> Preferences --> Settings
Choose the "Workspace Settings" tab to only change it for this project
Choose the "User Settings" tab to change it for all projects
Do a search for "settings.json" and look for an option to "Edit in settings.json"
Insert this color setting for the comments somewhere inside the curly brackets:
"editor.tokenColorCustomizations": {
"comments": "#ff4"
}
It might complain that you are overriding your current color theme, just ignore that.
If there is already a section for "editor.tokenColorCustomizations" then just add the line to specify the comment color.