You can change the background color in the rich text component by using the style or editor settings available in your platform. Choose a color that improves readability and matches your design theme. If you want a more creative appearance, pairing the background with a font unik style can make the content look more attractive and visually engaging.
Upon save received error message:
Unable to complete action
There is an error parsing Preferences.tps. This can occur if quotation marks other than basic single quotes (') or double quotes (") are used around attribute names. Until this is corrected, Tableau Desktop will use the default color palettes.
The following 1 errors occurred while parsing Preference file"C:\Users\billi\Documents\My Tableau Repository\Preferences.tps":
Fatal Error(18,43): whitespace expected (id: C:\Users\billi\Documents\My Tableau Repository\Preferences.tps)
My Quotes are straight and not curly - and I've attempted with both single and double quotes with the same issues. I have done this successfully in the past with prior versions of Tableau.
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name='My Red-Black Palette'type='regular'>
<color>#FF0000</color>
<color>#330000</color>
</preferences>
</workbook>
2021年8月25日 12:32 @Billie Boles
Hi, I think you are missing:
a. A space between Palette' and type
b. a </color-palette> at the end of the colors.
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name='My Red-Black Palette' type='regular'>
<color>#FF0000</color>
<color>#330000</color>
</color-palette>
</preferences>
</workbook>
If this post resolves. would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.
Regards,
Diego
When my bot generates plain message answers that include a color hex code, a color block shows. But when formatted as a table block, it doesn't. Anyone knows how to fix that?
2025年12月23日 6:59 This is a known limitation of Slack Block Kit.
The automatic "Color Swatch" preview (the little colored square) that appears next to Hex codes (e.g., #FF0000) is a feature of the standard Text Object (mrkdwn).
Why it fails in Tables:
Slack's new
"Table Block" (released in beta/late 2024) does not fully support all rich text features inside the cells yet. It often treats cell content as "Plain Text" or restricted markdown, which strips out the auto-generated color preview.Workaround:
You cannot "fix" the Table Block behavior. Instead:
- Use an Image: Generate a tiny 10x10px image of that color and insert it as an image element in the block (if not using a table).
- Use Emoji: If the colors are standard (Red, Blue, Green), map them to emojis (🔴, 🔵, 🟢) inside the table cell.
- Abandon Table Block: Use a series of Section Blocks with "Fields" (Columns). Section blocks fully support mrkdwn, so the Hex color preview will reappear.
- https://trailblazers.salesforce.com/profileView?u=005KX000003d0L3YAI
Hi All,
I am using superstore data wherein i have made a highlight table and color coded it based on a calculated field. My first task is done which was to coloe code the table based on the Sales range.
Attaching the graph and the calulated field i have used.
Next step is to further give a color gradient to each of the color (red , yellow and gree) sections and provide a shading (light to dark)
for e.g, if sales is close to 30000 it should be light yellow and if it goes up to 60000 it should be more dark. I am not able to implement that. Is it even possible??
Please help me. Pooja Gandhi Jonathan Drummey Sankarmagesh Rajan
2015年8月17日 14:37 Before I hop on my little soapbox, how's this?
This can't be configured in the Tableau UI as far as I know, I had to edit the preferences.tps file where I added the following custom color palette:
<color-palette name="Reds/Yellows/Greens" type="ordered-diverging"> <color>⌗ff0000</color> <!-- light red --> <color>⌗b10318</color> <!-- Red --> <color>⌗aaaaaa</color> <!-- grey spacer --> <color>⌗ffff7f</color> <!-- light yellow --> <color>⌗dfc063</color> <!-- Yellow --> <color>⌗aaaaaa</color> <!-- grey spacer --> <color>⌗00fc00</color> <!-- light green --> <color>⌗007600</color> <!-- Green --></color-palette>
See http://kb.tableau.com/articles/knowledgebase/creating-custom-color-palettes for more details on custom color palettes.
Then the Sales KPI calculation in Tableau is:
IF SUM([Sales]) > 1000000 THEN
7
ELSEIF SUM([Sales]) > 600000 THEN
(SUM([Sales]) - 600000) / 400000 + 6
ELSEIF SUM([Sales]) > 100000 THEN
(SUM([Sales]) - 100000) / 500000 + 3
ELSE
SUM([Sales]) / 100000
END
This returns a range of 0-1 for red, 3-4 for yellow, and 6-7 for green. This is necessary because we have to insert spacer colors in the custom color palette so the entire range of red/yellow/green is available for each KPI.
Then I set up the colors using the Advanced option to make sure that the full color range is used and to set the Start and Center:
Here's a link to the workbook on Tableau Public: Workbook: ordered diverging kpi color
Now for the soapbox, because this kind of viz has two serious issues:
1) It's using red and green. That makes somewhere between 5 and 8% of the male population (and up to 1/2% of the female population) unable to interpret this viz, I ran this particular set of colors through Vischeck http://vischeck.com for the most common form of color blindness:
With a split-second glance, in 2012 Chairs & Chairmats & Envelopes look like they are in the same range, so the use of color for pre-attentive processing is a total fail here. Now while it is possible to select colors that are distinct enough for color blind people to use this, since you wanted a continuous range that gets more difficult.
2) This viz is using both the hue of the color (red/yellow/green) and intensity (saturation) to identify the range. These are the *least* effective forms of visual encoding for quantitative data per http://mkt.tableau.com/downloads/designing-great-visualizations.pdf (page 8) after position, length, angle, and area/size. (Thanks to Ben Jones for the reference in his book _Communicating Data with Tableau_). While most of us do have red/yellow/green internalized for meanings, there are three continuous ranges here and that makes it even more complicated for users to interpret.
Now you might be able to muck around with the color settings and generate a set of 6 colors that have light/dark red, light/dark yellow, and light/dark green where each set of colors has increasing intensity that doesn't overlap , but you're probably better off spending your time building a different kind of visualization (or multiple visualizations). What are the business questions that are being asked here? If you're trying to identify the worst/best performers then maybe sorting the view might be better (so you are using position). If you're trying to look at change over time then use a line chart (which is encoding for position & length & angle), or maybe a bar chart with absolute or % difference. There are many possible visualizations that could be built out of this data that would help users more accurately answer the questions they have than this kind of chart. The wonderful thing about Tableau is that we can quickly and easily built a set of visuals to answer many different questions.
Jonathan
It is my understanding that if we want to be very specific about colors (green>=95%, yellow>=90%, red<90%) that we have to build a calculated field to precalculate those colors and then assign the labels to the appropriate color in the color shelf. If we want to color the whole row the same color, that works great. However, we want to vary the color across the row based on the value.
This may be possible (maybe even easy), but based on past failures I'm posting this so you can help educate me. We have multiple columns of percent values, but we want each value in each column to be treated independently for the (non-gradient) coloring. In essence, I'm trying to create something like this:
The easy solution would be to use the gradient coloring and just apply based on each value, but I am unaware of a way to create unequal 'bins' (0-.9, .9-.95, .95-1) for the color; if I do a custom gradient with three colors it seems to want them equal sized.
Can anyone point me to a relevant tutorial, or give me some hints on how to set this up so that each cell/column will be independently evaluated for the corresponding red/yellow/green color based on my required thresholds?
Right now each column is a separate measure, but we can reformat the data structure if needed.
2014年10月20日 15:34 Keith:
No problem at all. Thats the trick, the center value really looking for the center of your range. In my example .3 was the half of 0 - 0.6. If you create custom divergence, the color scale automatically creates the color palette mixing and you would loose your yellow.
I believe there is a Tableau idea to specify center color also and you can vote it.
OK, I have another option and let me know if this works;
- Using a calculated field for the color;
- created a calc field
- My Calc
SUM([Sales]) / TOTAL(SUM([Sales]))
- One more calc field - For Color Num. Make it a mea
if [My Calc] > 0 and [My Calc] < .35 then 1
elseif [My Calc] > .35 and [My Calc] < .45 then 2
else 3
end
NOTE: I used my ranges in the condition
- Used the For Color Num on the color shelf and make it 3 stepped color
- Drag your values to display on to the label shelf
This is what I got and hope this helps;
I changed the calc field with diff numbers and it seemed to work.
..kk
いまツリーマップを使っているのですが、値がBKなら黒、Wなら白というように、値に応じて塗る色を変えたいのです。
if
[col] == 'BK'
then '黒'
elseif [col] == 'W'
then '白'
else '青'
end
という感じでは、黒と指定したところが青になり、白と指定したところが赤になり、という形で全く無関係な色が割り当てられてしまいます。
本当はBKには#000000、白には#FFFFFFという感じで直接色を指定したいのですが、まあそれはともかく。
どなたかご存知であればコメントお願いします。
2021年4月16日 8:31 @T I さん、確認が遅くなってしまい申し訳ありません!
ディメンションまたはメジャーの色コードを指定したい場合はファイルを編集する必要があります。
設定ファイルを変更することになるので万一Tableauが動作不良を起こす可能性を踏まえてのサポート外ということですが、基本的には前回ご紹介したオンラインヘルプの手順に従えば問題ないと思います。
カラーパレットにはカテゴリーカラーパレットと、連続カラーパレットと、分岐カラーパレットとの3種類があります。
凡例の数に関係なくいくつでもパレットごとに色を追加できますので、凡例が増えた場合にはまた設定ファイルを開いて色コードを追加すれば大丈夫です。
よろしくお願いします。
Hi,
I would like to make a heatmap of a field on a red gradient, but make all negative values black. I tried red-black-white diverging (reversed), but I do not want the white shades in between. I basically want the gradient to start on positive numbers at red instead of white.
Please let me know if this is possible.
Thanks,
John
2018年10月2日 1:05 The problem is that most of the built-in diverging color palettes go from one color to another meeting at white or grey in the middle, but you can create your own custom palette that does not do this. Here's how: Create Custom Color Palettes
I created the following palette that goes from black to a bright red:
<color-palette name="Black/Red Diverging" type="ordered-diverging" >
<color>#000000</color>
<color>#FF0000</color>
</color-palette>
Using superstore, I dropped Profit on the Color card, then chose this palette:
However, it still shows a range of colors (not all negatives are black), so I created a calculated field as follows:
Color
IF SUM([Profit])<0 THEN
0
ELSE
SUM([Profit])
END
I then dragged this to the color card and chose the palette:
Close, but one of the problems with this is that low values still show very black. If you want postitive values to be more red, then you can fiddle with the color palette settings. For example, here I've selected "Use Full Color Range" and set the Center at 500:
See attached workbook.
Hi - I wanted to write the calculated field below to get the colour I wanted in case the colour is "#ff0000" which is a kind of bright red but keep as default 'black'.
IF [ERROR Flag]='ERROR' THEN "#ff0000"
ELSEIF [ERROR Flag ]='OK' THEN ""
END
I'm not able to get this right. Any suggestions what could I be doing wrong?
2017年11月12日 10:36 use below calculation and Edit Colour Legends as per required
IF [ERROR Flag]='ERROR' THEN "RED"
ELSEIF [ERROR Flag ]='OK' THEN "BLACK"
END
Now Edit Color Legend. Double click on RED color change the code
Hi - first question incoming!
I want to add a border/outline to a RCE box. I was advised to try css but no idea how to do that :(
Anyone have any suggestions please?
TIA!
#Salesforce Admin
2025年4月4日 5:09 You can use below code to apply border/outline to the box:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RCE Box Border</title>
<style>
.rce-box {
width: 300px;
height: 150px;
padding: 10px;
border: 2px solid #000000;
border-radius: 10px;
outline: 3px dashed
#ff0000;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="rce-box">
<p>Sample Text</p>
</div>
</body>
</html>
I am using the following curl -
curl --location 'https://hooks.slack.com/services/XXXXX/YYYYYY/ZZZZZZ' \
--header 'Content-Type: application/json' \
--data '{
"text": "Hola!",
"blocks": "[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"foo\"}}]",
"attachments": "[{\"color\":\"#FF0000\",\"blocks\":[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"doo\"}}]}]"
}'
This only send the blocks and not the attachments.
2024年4月15日 17:16 Not sure why you would be using attachments, as blocks are the preferred method. You should also really be using the chat.postmessage API, as webhooks are inherently insecure.
Here is an example of using CURL with webhooks and an attachment: https://stackoverflow.com/questions/46435795/syntax-help-adding-attachments-to-slack-incoming-webhooks