Apply Different Background Color to Promoted Links Tiles

Hello everyone,
Does anybody know a way of changing the background color of each individual tile of Promoted Links? If possible, and if anybody is familiar, I would like to do it using a JS Link file.
Thanks in advanced.
Fausto Capellan, Jr - SharePoint Admin

Hi Fausto,
You could try the script below to set color without randomly change:
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script><script type="text/javascript">
$(document).ready(function () {
var id;
var rgb;
var rgb1;
var rgb2;
var rgb3;
for (var i = 0; i < $("div.ms-tileview-tile-content").length; i++){
id = $("div.ms-tileview-tile-content")[i].id;
if(i%2 == 0){
rgb1 = getRgb(0,i);
rgb2 = getRgb(50,i);
rgb3 = getRgb(150,i);
}else{
rgb1 = getRgb(150,i);
rgb2 = getRgb(50,i);
rgb3 = getRgb(0,i);
rgb = "rgb("+rgb1+","+rgb2+","+rgb3+")";
$("#"+id).css("background-color",rgb);
function getRgb(n,i){
var rgbNum = n + i *25;
if (rgbNum < 255){
return rgbNum;
}else{
getRgb(1,1);
</script>
Please set the parameter “n” with number per your situation in the function getRgb(n,i). The screenshot below is my result:
Regards,
Rebecca Tu
TechNet Community Support

Similar Messages

  • Applying different background colors to selected paragraphs

    Hello there,
    In the text that is loaded dynamically as XML (i.e. markup format) I need to specify background color for selected paragraphs.
    So, I tried this: <p backgroundColor='#800000'>.
    Alas, it has no effect.
    What puzzles me even more is that declaring this attribute in span DOES work:
    <p><span backgroundColor='#800000'>Lorem impsum ... </span></p>
    This way it does change the background color, albeit, it is not solid background but sort of highlight of the text lines.
    Although, it's not ideal, I could live with that, but still would be interested to find out: what am I missing?
    After all, span can't have children, so it is a patch rather then nice solution.
    So, far I couldn't find the explanation of that behavior - ignoring 'backgroundColor' attribute in the paragraph tag.
    I'm on Mac 10.6.6 and use TLF 2.0 build 228
    BTW, searching for an answer I found a typo in the official TLF 1.1 Markup specification that was published back in December:
    6.3.13 backgroundColor attribute
    <xs:attribute name="textAlpha" type="xs:text" default=" transparent"/>
    Background color of the text.
    backgroundColor is non-inheriting.
    Valid values include:
    • transparent: No color is applied.
    • <hexadecimal value>: A value that conforms to the color data type.
    Thanks,
    Igor Borodin

    Here is the app and the screen shot of the runtime error:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark" >
    <fx:Script>
    <![CDATA[
    import spark.utils.TextFlowUtil;
    XML.ignoreWhitespace = false;
    [Bindable]
    private var txtXML:XML = <TextFlow version="2.0.0" xmlns="http://ns.adobe.com/textLayout/2008" fontSize='18' >   
        <p>
    <g>Lorem ipsum dolor sit amet,
    <span color='#880000'>consectetur adipiscing elit.</span>
    Quisque tempus, eros ac dignissim interdum, elit sem euismod velit,
    <span fontStyle='italic'>eget laoreet urna metus nec enim.</span>
    </g>
    </p>
    </TextFlow>
    ]]>
    </fx:Script>
    <s:RichText horizontalCenter="0" verticalCenter="0" width="200"
    textFlow="{TextFlowUtil.importFromXML(txtXML)}" />
    </s:Application>
    I'm on Mac 10.6.6 Flex Hero 4.5 TLF 2.0 build 228
    It's the same on Safari and FireFox
    HTH,
    Igor Borodin

  • Promoted Links Tile Background Image Size Issue

    I am brand new to using sharepoint and I am having an issue with the images attached to the promoted link tiles.  No matter what size I change the file too, I can not get the tile to show the whole pictures.
    I have tried changing the image size for multiple different pictures in both photoshop and illustrator to 128px and 150px, with no luck!
    Does anyone have any advice on how to make the pictures fit in the tiles or how to start with an illustrator or indesign image and format it correctly to display in the tile view?
    As many details as possible will help since I just started using this program! 
    Thank you!

    Hi,
    According to your description, my understanding is the promoted link tile can’t show the whole image.
    By default, When image with a blank space around, it would be transformed properly in promote link tile, I suggest you modify the image to make it with blank space around.
    For about modifying image, I suggest you post a question to the corresponding forum such as Photoshop forum:
    https://forums.adobe.com/community/photoshop
    Feel free to reply if there are still any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Change different background color in row grid

    Hi,
        i want to change different  background color in row grid..ex.two different colors should continue in all row grid..pls guide me ..
    Regards,
    Senthil.

    Hi Senthil,
    If I understand you correctly, you wish to show a grid with alternating colours down the rows.
    You have a few options:
    1) Apply a stylesheet nd display it as HTML.  But this solution lacks the advantages of the iGrid
    2) Return a field with alternating 1's and 0's in the query and use this field in the Colour-Context mapping
    3) Use JavaScript to loop through each row and set alternating background cell colour for all columns
    Hope this helps.
    Cheers,
    Jai.

  • Different background color in  summation

    Is there any possibilities to set the different background color and applied the conditional format in summation columns in vertical table in obiee answers.
    Kindly let me know asap.
    Thanks in advance.

    Hi,
    Do you mean in grand total columns? if so just click on edit table view >> beside the summation symbol click on the properties button there you can change the font color or back ground color etc...
    Update if required.
    Mark if Helpful/correct.
    Thanks.

  • Can I get different background colors on menu items?

    I've been trying to get different background colors on my menu (Quick launch) items for a while, without success. What I want is the even numbered items (the second, fourth, sixth...) to have a different background color than the uneven ones (first, third,
    fifth...).
    Anyone knows if this can be done?
    Thanks, guys!

    Can you do something in the javascript code where you have given specific IDs to each buttons in your menu? It could end up in something like "$('#menu_id').css('background-color', '#1B3E70');"
    Or, let say you have controls defined like thie:
    <body>
    <ul class="menu">
    <li class="menu-item"><a>item 1</a></li>
    <li class="menu-item"><a>item 2</a></li>
    <li class="menu-item"><a>item 3</a></li>
    </ul>
    </body>
    Can't you write at render stage this kind of actions by index:
    var i = $("li").index( $(this).parent() );
    if ( i === 1 ) {
    $('body').css('background', 'red');
    } else if ( i === 2 ) {
    $('body').css('background', 'green');
    } else {
    $('body').css('background', 'brown');

  • Rows with different background color in array

    I am displaying an array indicator. When certain values are found in a row of the array, I would like the row to have a different background color so that it stands out on the front panel. Can this be done? Especially, can this be done using property nodes dynamically?
    Thank you

    Hi jmaarek,
    I don't think you can do this with arrays as all the elements have the same properties.
    You can do this with a table though. Use the 'Active Cell' property (set the row to -2 to select the entire row) and the 'CellBGColor' property.
    Hope this helps.

  • Sort promoted links tiles(Tiles View) in alphabetical order.

    Hi,
    i want to sort my promoted linked list tiles in alphabetical order. OOTB there is no option to sort promoted links tiles view .Any pointers on how to do this will be really helpful.

    Hi,
    If you would like to sort it by title automatically, you would modify Tiles view aspx page in SharePoint Designer.
    Please open SharePoint Designer > All files > Lists > promoted link list > Tiles.aspx, then locate the below code:
    <Query>
    <OrderBy>
    <FieldRef Name="TileOrder" Ascending="TRUE"/>
    <FieldRef Name="Modified" Ascending="FALSE"/>
    </OrderBy>
    </Query>
    Then replace it by the code below:
    <Query>
    <OrderBy>
    <FieldRef Name="Title" Ascending="TRUE"/>
    </OrderBy>
    </Query>
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Promoted Links Tiles

    I am having an issue with the images attached to the promoted link tiles.  No matter what size I change the file too, I can not get the tile to show the whole pictures. 
    Does anyone have any advice on how to make the pictures fit in the tiles?
    Thank you!

    I would suggest going with a square size. Either 64x64 or 128x128. Also, try other pictures to make sure it's just an issue with that particular picture.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • Different background color in panelBox's header

    Hi,
    I need to have a different background in the header of the panelBox than the background color of its content.
    <af:panelBox text="Aug 8, 20121"
    id="pb5"
    titleHalign="center"
    type="flow"
    showDisclosure="false"
    ramp="highlight"
    background="light">
    I understand that we can change style in css. But I only want this style of panelBox apply to one UI page only. It should not affect panelboxes in other UI pages.
    How can I achieve this? What's the syntax of changing the background color of panelBox's header?
    Thanks
    -Mina

    Hi,
    the solution is to use instance specific skinning. In this you define a styleCalss name for the panel box you want to change
    <af:panelBox
      icon="/skins/images/guy.gif"
      text="PanelBox Instance Skinned"
      styleClass="DifferentBackgrundColor">
          <f:facet name="toolbar"/>
    </af:panelBox>.DifferentBackgrundColor af|panelBox::header-start,
    .DifferentBackgrundColor af|panelBox::header-center,
    .DifferentBackgrundColor af|panelBox::header-end,
    -tr-inhibit:background-image;
    background-color:red;
    Frank

  • Encore DVD 2.0 on Windows: Composition background color of dynamically linked After Effects projects

    Hello,
    I used Adobe Dynamic Link to import an After Effects project, and I saw that in Encore the background color of a composition is set to black even though it is defined with another value in After Effects.
    I had to open the project in AE and place a solid layer with the desired color behind all other layers.
    What are the causes for this behaviour? Did I do something wrong or is it a bug?
    Best regards,
    Christian Kirchhoff

    The composition background is transparent. It has per se no color and does not react to blendmodes and such. It's imaginable that Encore resets it to black for whatever reason (wouldn't know, as I design my menus always with full frame backgrounds to begin with). Still, I would consider it a bug regardless, so please fiel away:
    http:www.adobe.com/go/wish
    Mylenium

  • Remove the blue color of Promoted Links

    Hello,
    I work as a SharePoint architect for Telenor Norway.
    We have a SharePoint 2013 Foundation On-premises solution and im trying to remove the blue color from the promoted links.
    Is this possible?
    Thanks in advance
    Olav

    Hi,
    try modifying the master page to rewrite the css style of those links.
    Regards.
    If a post answers your question, please click Mark As Answer on that post and
    Vote as Helpful

  • How do I change the colors of Ring texts individually so when it pulls down, I can see each test with different background color?

    I have been using LabView for a almost 18 months now. There was no problem which I could not solve with help of all resources available. But, this is one where I am scratching my head since long time now.
    I would like to change colors of each individual text in Ring control programmatically. I have attached example VI. In this VI, I change background color of ring text, but it changes only the current (active) background color, so when you pull down the whole menu, it shows same default color for all the text background (not even the color I asked it to). Is there anyway I can define individually as to what color should be related to each text in ring menu?
    Attachments:
    Ring Menu Colors.JPG ‏16 KB
    RGB Ring.vi ‏33 KB

    " Is there anyway I can define individually as to what color should be related to each text in ring menu?"
    Well not with a ring and not programatically.
    The best I can suggest is a picture ring, see below.
    Ben
    Message Edited by Ben on 11-18-2005 02:16 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Picture Ring.JPG ‏5 KB

  • Different background colors after publishing

    I imported a powerpoint presentation into Captivate 7 and everything looks fine in the film strip. However, when I preview or publish the project some of the background colors change dramatically (dark blue/grey turns into sky blue). Is there a way to get around this prioblem?

    Here is what the color difference looks like. The first is after publishing and the second is what it looks like within captivate

  • UITableView: set different background colors for header and the table

    I would like to set my background color for my UITableView to white and set my tableViewHeader backgroundColor to grayColor similar to the facebook app. When I bounce scroll my table so that you can see above the header, then currently it is white above the header view. I want that to be brown instead.
    In the facebook app, above the headerview, it is a blue color and below the table is a white color. If i try and set the UITableView backgroundColor to brown, then the top will be brown, but so will the bottom. Additionally, all of the unset cells will have a brown background instead of white.
    Any help with this?

    Fixed..

Maybe you are looking for

  • Upgrade IOS 7.1 -- Can't use / open 3G / Data

    When I upgrade IOS7.1 -- I can't use / open Data / 3G?? WHY????

  • Font book is slow to load

    Since upgrading to Yosemite I have a problem with Font Book now being EXTREMELY slow in loading. Under Mavericks the collection list shows up almost immediately and the full font list comes up in about 10 seconds for about 15 seconds to load the 617

  • How can I take a screen shot of the whole page in iweb

    Hello all, Happy Saturday. I want to take a screenshot of my entire page but I only see a part of the page on the screen. How can I display the whole page at once in order to make a thumbnail image? Thank you in advance for I know someone will have t

  • Looking at Results of Database queries in Policy Studio

    When using the "Retrieve from or write to database" filter in PolicyStudio, the query results can be stored into a user attribute list (attribute.lookup.list). When we configure this, what keys do we use to query the Hashmap so that we can get result

  • Packaging question

    Hi, sorry if this has been covered before, I'm just getting started with this. When I create an assignment and package in InDesign(CS3) the result is an .inca file, an .injb file, and an .incp file, as well as a "content" folder containing all the .i