| Color Name | Background | Text | Button | Border |
|---|---|---|---|---|
| Primary (Blue) | bg-primary | text-primary | border-primary | |
| Secondary (Grey) | bg-secondary | text-secondary | border-secondary | |
| Success (Green) | bg-success | text-success | border-success | |
| Danger (Red) | bg-danger | text-danger | border-danger | |
| Warning (Yellow) | bg-warning | text-warning | border-warning | |
| Info (Cyan) | bg-info | text-info | border-info | |
| Light (White) | bg-light | text-light | border-light | |
| Dark (Black) | bg-dark | text-dark | border-dark |
Q1. What are Bootstrap theme colors?
A. Bootstrap theme colors are predefined color classes used for UI design.
Q2. How many default theme colors are there in Bootstrap?
A. There are 8 default theme colors in Bootstrap.
Q3. Name all Bootstrap theme colors.
A. Primary, Secondary, Success, Danger, Warning, Info, Light, Dark.
Q4. What does bg-primary do?
A. It applies the primary color to the background.
Q5. Difference between bg-primary and text-primary?
A. bg-primary changes background color, text-primary changes text color.
Q6. Which color is used for success messages?
A. success (green) color.
Q7. Which color is used for errors?
A. danger (red) color.
Q8. Why use text-dark with bg-warning?
A. For better readability because yellow background is bright.
Q9. What is the use of border-primary?
A. It applies the primary color to the border.
Q10. Are Bootstrap color classes responsive?
A. Yes, they work on all screen sizes.
Q11. Can we use multiple color classes together?
A. Yes, for example bg-info text-dark.
Q12. Can Bootstrap colors be customized?
A. Yes, by overriding CSS or using custom styles.
Q13. Why should we use Bootstrap colors?
A. They save time, keep UI consistent, and reduce CSS work.
Q14. One-line interview answer?
A. Bootstrap colors provide ready-made responsive UI color classes.