CCSDK Web, Get Colors in a Library - adobecreativesdk

Does anyone know how to get colors that are stored in a CC Library? For example, I can see the colors exist, but there is no way to select them from the asset browser. The colors are greyed out and not selectable. Additionally, I would even prefer a means of API access, to list all the colors in given library/libraries if that is possible. Screenshot for reference regarding the colors in an asset browser (https://1drv.ms/u/s!AhPmq8rPJiUghLhLJJOS85fleFj1Fg).
Additionally, I have tried some of the code below in the console once the CreatedSDK has been initialized/Authenticated, but all return undefined or error.
AdobeCreativeSDK.API.Libraries.getLibraries();
AdobeCreativeSDK.API.Libraries.getLibraries({});
AdobeCreativeSDK.API.Libraries.getLibrary();
AdobeCreativeSDK.API.Libraries.getLibrary({id:'<LibraryIDHere>'}, function(response){console.log(response)});

Related

There is an equivalent to isPointInFill for Firefox?"

I created a few charts on D3.js and they are running well at Chrome. However I'm having the follow error on Firefox.
Error: path.isPointInFill is not a function
I have looked at the documentation,
https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill, and it's not supported on Firefox, but I didn't found an equivalent or a substitute.
What I need to do:
I have a chart XY, which is separated into several paths (with different shapes). I'm plotting the results from an user in X and Y and I need that the path where the users is located change the color.
Follow example..
...after that I plotted the user I need change the color of the p6.

How to retrieve VS syntax colours

I am building a more advanced editor for VS 2017 / 2019. However, one of the things which is important is to maintain the same colours as defined by the user / theme the user has chosen.
Now, for all the environment colours (that is, all aspects of VS which are not the contents of the editor window), these are easily obtained via the method
VSColorTheme.GetThemedColor(themeResourceKey);
Using the predefined themeResourceKeys as defined in
Microsoft.VisualStudio.PlatformUI.EnvironmentColors
So, for example, to retrieve the background color key for the tool window background, you call the following
VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowBackgroundColorKey);
What I am after is the keys of the colors being used by VS to color class names, comments, line number, privates, publics, statics, etc, all colors used in the editor. With these color keys, I'd like to then use these code keys to call a VS extensibility class or method to retrieve the actual colours being used.
Does anyone have any knowledge on how the editor is retrieving these actual color keys, and how I can use these to retrieve the currently set color?
Thanks

Sprite PNG is appearing distorted

We are using a png/8 sprite on a client's website. He is reporting the image is appearing distorted for him and on other computers on the company.
Here's how it should look:
http://i.imgur.com/wfV7ReR.jpg
And here is the print screen the client sent us:
http://i.imgur.com/sWKDYKU.jpg
I have tried donloading and exporting it again, uploading again. The problem is: On our computers it looks fine, so it's hard to test it. Our client is viewing it in IE: 11 and Google chrome: 41.0.272.118.
Has anyone seen this type of error before?
It may be the device-pixel-ratio is better than 160dpi; that'd throw off some CSS used for spriting.
If this shows "1" for you and a different value for them, I'd dig farther on that one. You could probably test this by hitting the site with an iPhone or newer Android device; they have >1.0 pixel ratios.
http://www.devicepixelratio.com/
Edit: this would also show up across-browsers on their end, as it's tied to the hardware, and not IE11.
My bet in that case is the PNG is somehow broken.
graphicdesign.stackexchange.com might be more useful; I don't know if this is fixable in CSS. (Might be; look for hacks around image backgrounds as well.)
Looking around, if you have Photoshop, you might try saving the original image, then creating a copy and changing this setting:
Image -> Mode -> Check "RGB Color"
Alternatively, try opening the image in pixlr.com, change anything however slightly, then save and use that one.
My strong suspicion is something in the way the PNG/8 is saved (maybe the alpha channel) is the issue, not any CSS you've written. Good luck!

How to programmatically create a 'bright' and a 'gray' version of an icon?

In a win32 application, I want to have a button with an icon which looks gray when the button is disabled and 'brighter' when the mouse hovers.
I know I can create three bitmaps with an icon editor, but since the icon can be user selected and loaded from the disk, I would like to create the other two versions programmatically.
So, starting with a handle to an image, I would like to:
- Create a new image with all colors converted to grey.
- Create a new image with all colors shifted to white or yellow.
Can this be done using win32 api calls?
Examples in any language will be appreciated.
Maybe the good old DrawState function will suffice. (For some reason it is now listed as only available from Win2000 which is not true.)
And maybe not, in which case you might want to use SetColorAdjustment function.
If the icon is user-selected do you control the format? If not you'll probably want to incorporate an image library or external process like DevIL or Imagemagick which handle more formats than Microsofts API's are likely to..

How to set g:text style to bold font in a Windows Gadget?

I'm developing a Vista/Win7 Desktop Gadget that uses a translucent g:background (doc) area with g:text (doc) on top. I'm adding the text via addTextObject (doc), and this all works as expected.
However, I can't figure out how to set that text to bold style. There doesn't seem to be a way to do this directly via the exposed properties that I can see, and I can't use regular text + CSS in this case due to the fact this text is placed onto a g:background object.
I have also tried specifying a bold font directly, such as Arial Bold (doesn't work) instead of Arial (works).
So how can this be done?
Edit: I have tried setting font-weight:bold for both the body and the g:background object that parents my text; no luck.
See Flip Calendar, by Jonathan Abbott. His code is usually well commented so maybe you can get some ideas from that.
EDIT
The source of my information was from the early days of Vista Beta 2 where that was the official word from MS. I also found the following response to a thread on the MSDN forums regarding the Flip Calendar gadget itself:
http://social.msdn.microsoft.com/Forums/en-US/sidebargadfetdevelopment/thread/841e9d5e-32e9-453f-bd0e-dc5a4e607c33/
The gadget has options for setting bold font on the day of the month (a g:text object) but on closer inspection it doesn't work. Sorry about that. The MS guys have been known to be wrong as well on one or more occasions. I can honestly say that I don't use the g:text object.
This means your only (well, non activex route) option is VML text, which provides a lot of flexibility on layout. However, you will have to place it on a fully opaque area of the gadget which is probably why you wanted to use the addTextObject in the first place. Gary Beene's site really helped me out when I was getting started, but it doesn't go into any detail on the v:textbox element and the v:textpath element, though the MSDN documentation goes into enough detail on these.
If you need to place the text on a non-fully opaque area of the gadget, then you could still go the VML route and place an image behind the text that acts as a shadow, starting out fully opaque and fading to fully transparent. This is how Microsoft does text in window title bars with aero enabled.
Alternatively, you could create an ActiveXObject that draws the text you need in the font you want and saves the image to a temporary file in the gadget folder. Then you set that to the src of an addImageObject. I've done something similar in a gadget and it's fast enough not to be noticeable. You can also set min/max dimensions so shrinking/stretching to fit becomes a breeze.

Resources